feat: Add screen orientation setting and improve padding for navigation bars in ChatsList and Onboarding screens

This commit is contained in:
k1ngsterr1
2026-01-18 19:52:56 +05:00
parent fcc7755fb5
commit aac5081dec
11 changed files with 49 additions and 9 deletions

View File

@@ -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 {