mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-23 00:17:34 +00:00
Fix post notifications permission request
This commit is contained in:
parent
29275cef51
commit
303aacb2e3
@ -8,6 +8,7 @@ import android.content.ClipboardManager
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.SpannableString
|
import android.text.SpannableString
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
@ -300,7 +301,8 @@ class HomeActivity : PassphraseRequiredActionBarActivity(),
|
|||||||
EventBus.getDefault().register(this@HomeActivity)
|
EventBus.getDefault().register(this@HomeActivity)
|
||||||
if (intent.hasExtra(FROM_ONBOARDING)
|
if (intent.hasExtra(FROM_ONBOARDING)
|
||||||
&& intent.getBooleanExtra(FROM_ONBOARDING, false)) {
|
&& intent.getBooleanExtra(FROM_ONBOARDING, false)) {
|
||||||
if ((getSystemService(NOTIFICATION_SERVICE) as NotificationManager).areNotificationsEnabled().not()) {
|
if (Build.VERSION.SDK_INT >= 33 &&
|
||||||
|
(getSystemService(NOTIFICATION_SERVICE) as NotificationManager).areNotificationsEnabled().not()) {
|
||||||
Permissions.with(this)
|
Permissions.with(this)
|
||||||
.request(Manifest.permission.POST_NOTIFICATIONS)
|
.request(Manifest.permission.POST_NOTIFICATIONS)
|
||||||
.execute()
|
.execute()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user