Implement notifications preference

This commit is contained in:
Moez Bhatti
2018-01-04 01:37:02 -05:00
parent f02bdde618
commit b77e87ea85
4 changed files with 40 additions and 10 deletions
@@ -25,6 +25,7 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.net.Uri
import android.os.Build
import android.support.v4.app.NotificationCompat
import android.support.v4.app.NotificationManagerCompat
@@ -122,6 +123,7 @@ class NotificationManager @Inject constructor(
.setDeleteIntent(seenPI)
.addAction(readAction)
.setStyle(style)
.setSound(Uri.parse(prefs.ringtone.get()))
.setVibrate(if (prefs.vibration.get()) VIBRATE_PATTERN else longArrayOf(0))
if (Build.VERSION.SDK_INT >= 24) {