fix update channel debounce

This commit is contained in:
Salvatore Giordano
2021-03-01 13:15:39 +01:00
parent 586e9dab5e
commit 3d43c84fbb
3 changed files with 10 additions and 7 deletions
@@ -1692,11 +1692,14 @@ class ChannelClientState {
set _channelState(ChannelState v) {
_channelStateController.add(v);
debounce(
timeout: Duration(milliseconds: 500),
target: _channel._client.chatPersistenceClient?.updateChannelState,
positionalArguments: [v],
);
if (_channel._client.persistenceEnabled) {
debounce(
timeout: Duration(milliseconds: 500),
target: _channel._client.chatPersistenceClient?.updateChannelState,
positionalArguments: [v],
);
}
}
/// The channel threads related to this channel