clean incognito notification function
This commit is contained in:
parent
a851c0f715
commit
f038dcb255
3 changed files with 7 additions and 6 deletions
|
@ -941,7 +941,8 @@ fun checkCountry(context: Context): Boolean {
|
|||
else -> false
|
||||
}
|
||||
}
|
||||
fun notification(context: Context){
|
||||
fun incognitoNotification(context: Context){
|
||||
val CHANNEL_ID = 26
|
||||
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
val incognito = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("incognito", false)
|
||||
if (incognito) {
|
||||
|
@ -951,9 +952,9 @@ fun notification(context: Context){
|
|||
.setContentText("Disable Incognito Mode")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
.setOngoing(true)
|
||||
notificationManager.notify(26, builder.build())
|
||||
notificationManager.notify(CHANNEL_ID, builder.build())
|
||||
} else {
|
||||
notificationManager.cancel(26)
|
||||
notificationManager.cancel(CHANNEL_ID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue