feat: Add screen orientation setting and improve padding for navigation bars in ChatsList and Onboarding screens
This commit is contained in:
@@ -37,6 +37,10 @@ class RosettaFirebaseMessagingService : FirebaseMessagingService() {
|
||||
private const val CHANNEL_ID = "rosetta_messages"
|
||||
private const val CHANNEL_NAME = "Messages"
|
||||
private const val NOTIFICATION_ID = 1
|
||||
|
||||
// 🔥 Флаг - приложение в foreground (видимо пользователю)
|
||||
@Volatile
|
||||
var isAppInForeground = false
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,6 +93,11 @@ class RosettaFirebaseMessagingService : FirebaseMessagingService() {
|
||||
* Показать уведомление о новом сообщении
|
||||
*/
|
||||
private fun showMessageNotification(senderPublicKey: String?, senderName: String, messagePreview: String) {
|
||||
// 🔥 Не показываем уведомление если приложение открыто
|
||||
if (isAppInForeground) {
|
||||
return
|
||||
}
|
||||
|
||||
createNotificationChannel()
|
||||
|
||||
// Intent для открытия чата
|
||||
@@ -122,6 +131,11 @@ class RosettaFirebaseMessagingService : FirebaseMessagingService() {
|
||||
* Показать простое уведомление
|
||||
*/
|
||||
private fun showSimpleNotification(title: String, body: String) {
|
||||
// 🔥 Не показываем уведомление если приложение открыто
|
||||
if (isAppInForeground) {
|
||||
return
|
||||
}
|
||||
|
||||
createNotificationChannel()
|
||||
|
||||
val intent = Intent(this, MainActivity::class.java).apply {
|
||||
|
||||
Reference in New Issue
Block a user