fix(llc): dispose channel on deletion
This commit is contained in:
@@ -1462,6 +1462,8 @@ class ChannelClientState {
|
||||
|
||||
_listenChannelUpdated();
|
||||
|
||||
_listenChannelDeleted();
|
||||
|
||||
_listenMemberAdded();
|
||||
|
||||
_listenMemberRemoved();
|
||||
@@ -1563,6 +1565,12 @@ class ChannelClientState {
|
||||
}));
|
||||
}
|
||||
|
||||
void _listenChannelDeleted() {
|
||||
_subscriptions.add(_channel.on(EventType.channelDeleted).listen((Event e) {
|
||||
_channel.dispose();
|
||||
}));
|
||||
}
|
||||
|
||||
void _listenChannelTruncated() {
|
||||
_subscriptions.add(_channel
|
||||
.on(EventType.channelTruncated, EventType.notificationChannelTruncated)
|
||||
|
||||
@@ -157,7 +157,10 @@ class ChannelListCoreState extends State<ChannelListCore> {
|
||||
presence: widget.presence,
|
||||
memberLimit: widget.memberLimit,
|
||||
messageLimit: widget.messageLimit,
|
||||
paginationParams: PaginationParams(limit: widget.limit),
|
||||
paginationParams: PaginationParams(
|
||||
limit: widget.limit,
|
||||
offset: 0,
|
||||
),
|
||||
);
|
||||
|
||||
/// Fetches more channels with updated pagination and updates the widget
|
||||
|
||||
Reference in New Issue
Block a user