forked from upstream-mirrors/quik
Request notification permission on Android 13
This commit is contained in:
@@ -57,6 +57,7 @@ import com.moez.QKSMS.util.GlideApp
|
||||
import com.moez.QKSMS.util.PhoneNumberUtils
|
||||
import com.moez.QKSMS.util.Preferences
|
||||
import com.moez.QKSMS.util.tryOrNull
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@@ -94,6 +95,11 @@ class NotificationManagerImpl @Inject constructor(
|
||||
return
|
||||
}
|
||||
|
||||
if (!permissions.hasNotifications()) {
|
||||
Timber.w("Cannot update notification because we don't have the notification permission")
|
||||
return
|
||||
}
|
||||
|
||||
val messages = messageRepo.getUnreadUnseenMessages(threadId)
|
||||
|
||||
// If there are no messages to be displayed, make sure that the notification is dismissed
|
||||
|
||||
Reference in New Issue
Block a user