mirror of
https://github.com/BlueBubblesApp/bluebubbles-app.git
synced 2025-08-06 03:15:57 +08:00
more message match improvements
- new/updated messages from fcm are ignored while the app is alive since socket will handle them
This commit is contained in:
@ -60,6 +60,13 @@ class MethodChannelService extends GetxService {
|
||||
case "new-message":
|
||||
await storeStartup.future;
|
||||
Logger.info("Received new message from MethodChannel");
|
||||
|
||||
// The socket will handle this event if the app is alive
|
||||
if (ls.isAlive) {
|
||||
Logger.debug("App is alive, ignoring new message...");
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
Map<String, dynamic>? data = arguments;
|
||||
if (!isNullOrEmpty(data)) {
|
||||
@ -80,6 +87,13 @@ class MethodChannelService extends GetxService {
|
||||
case "updated-message":
|
||||
await storeStartup.future;
|
||||
Logger.info("Received updated message from FCM");
|
||||
|
||||
// The socket will handle this event if the app is alive
|
||||
if (ls.isAlive) {
|
||||
Logger.debug("App is alive, ignoring updated message...");
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
Map<String, dynamic>? data = arguments;
|
||||
if (!isNullOrEmpty(data)) {
|
||||
|
Reference in New Issue
Block a user