fix: use createdAt property to determine if the message is synced.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -820,13 +820,7 @@ class Channel {
|
|||||||
_checkInitialized();
|
_checkInitialized();
|
||||||
|
|
||||||
// Directly deleting the local messages which are not yet sent to server.
|
// Directly deleting the local messages which are not yet sent to server.
|
||||||
final isSynced = message.state.isCompleted ||
|
if (message.remoteCreatedAt == null) {
|
||||||
message.state.isUpdating ||
|
|
||||||
message.state.isDeleting ||
|
|
||||||
message.state.isUpdatingFailed ||
|
|
||||||
message.state.isDeletingFailed;
|
|
||||||
|
|
||||||
if (!isSynced) {
|
|
||||||
state!.deleteMessage(
|
state!.deleteMessage(
|
||||||
message.copyWith(
|
message.copyWith(
|
||||||
type: 'deleted',
|
type: 'deleted',
|
||||||
|
|||||||
Reference in New Issue
Block a user