Фикс: пуш-уведомления не читались при открытии приложения
- cancelAll() в onResume — сбрасывает все уведомления и бейдж при открытии приложения - showSimpleNotification принимает senderPublicKey и использует тот же ID что cancelNotificationForChat — теперь fallback-уведомления тоже удаляются при входе в чат Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -423,6 +423,8 @@ class MainActivity : FragmentActivity() {
|
||||
super.onResume()
|
||||
// 🔥 Приложение стало видимым - отключаем уведомления
|
||||
com.rosetta.messenger.push.RosettaFirebaseMessagingService.isAppInForeground = true
|
||||
// 🔔 Сбрасываем все уведомления из шторки при открытии приложения
|
||||
(getSystemService(NOTIFICATION_SERVICE) as android.app.NotificationManager).cancelAll()
|
||||
// ⚡ На возврате в приложение пробуем мгновенный reconnect без ожидания backoff.
|
||||
ProtocolManager.reconnectNowIfNeeded("activity_onResume")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user