mirror of
https://github.com/BlueBubblesApp/bluebubbles-app.git
synced 2025-08-06 19:44:08 +08:00
Fix mark chat as read from Java code not working
This commit is contained in:
@ -137,6 +137,18 @@ class MethodChannelService extends GetxService {
|
||||
return true;
|
||||
}
|
||||
case "markAsRead":
|
||||
if (ls.isAlive) return;
|
||||
await storeStartup.future;
|
||||
Logger.info("Received markAsRead from Java");
|
||||
final data = call.arguments as Map?;
|
||||
if (data != null) {
|
||||
Chat? chat = Chat.findOne(guid: data["chat"]);
|
||||
if (chat != null) {
|
||||
chat.toggleHasUnread(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case "chat-read-status-changed":
|
||||
if (ls.isAlive) return;
|
||||
await storeStartup.future;
|
||||
|
Reference in New Issue
Block a user