Skip to content

Commit 0ae3c5f

Browse files
author
Eduard Aksamitov
committed
feat: add logux/subscribed
1 parent faa5469 commit 0ae3c5f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

index.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ export const devtools = {
156156
if (layers.subscription !== false) {
157157
client.on('add', (action, meta) => {
158158
if (
159+
action.type !== 'logux/processed' &&
159160
action.type !== 'logux/subscribe' &&
160-
action.type !== 'logux/unsubscribe' &&
161-
action.type !== 'logux/processed'
161+
action.type !== 'logux/subscribed' &&
162+
action.type !== 'logux/unsubscribe'
162163
) {
163164
return
164165
}
@@ -218,6 +219,17 @@ export const devtools = {
218219
delete subscribing[action.id]
219220
}
220221
}
222+
} else if (action.type === 'logux/subscribed') {
223+
api.addTimelineEvent({
224+
layerId: subscriptionLayerId,
225+
event: {
226+
time,
227+
data: {
228+
type: 'subscribed by server',
229+
channel: action.channel
230+
}
231+
}
232+
})
221233
}
222234
})
223235
}

0 commit comments

Comments
 (0)