File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -192,12 +192,19 @@ class ChannelStoreImpl with ChannelStore {
192
192
193
193
case ChannelDeleteEvent ():
194
194
for (final stream in event.streams) {
195
- assert (identical (streams[stream.streamId], streamsByName[stream.name]));
196
- assert (subscriptions[stream.streamId] == null
197
- || identical (subscriptions[stream.streamId], streams[stream.streamId]));
198
- streams.remove (stream.streamId);
199
- streamsByName.remove (stream.name);
200
- subscriptions.remove (stream.streamId);
195
+ final localStream = streams[stream.streamId];
196
+ if (localStream == null ) continue ; // TODO(log)
197
+
198
+ final ZulipStream (: streamId, name: String streamName) = localStream;
199
+ if (streamName != stream.name) {
200
+ // TODO(log)
201
+ }
202
+ assert (identical (streams[streamId], streamsByName[streamName]));
203
+ assert (subscriptions[streamId] == null
204
+ || identical (subscriptions[streamId], streams[streamId]));
205
+ streams.remove (streamId);
206
+ streamsByName.remove (streamName);
207
+ subscriptions.remove (streamId);
201
208
}
202
209
}
203
210
}
You can’t perform that action at this time.
0 commit comments