notification improvements (#522)

* correctly filter notifications on Api >= 26, other fixes and refactoring

* use correct areNotificationsEnabled method in MainActivity

* change notification led color
This commit is contained in:
Konrad Pozniak 2018-02-12 22:03:08 +01:00 committed by GitHub
commit 0b59b8d0ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 55 deletions

View file

@ -20,12 +20,12 @@ import android.content.Context
import android.content.Intent
import com.keylesspalace.tusky.TuskyApplication
import com.keylesspalace.tusky.util.NotificationManager
import com.keylesspalace.tusky.util.NotificationHelper
class NotificationClearBroadcastReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val accountId = intent.getLongExtra(NotificationManager.ACCOUNT_ID, -1)
val accountId = intent.getLongExtra(NotificationHelper.ACCOUNT_ID, -1)
val accountManager = TuskyApplication.getAccountManager()
val account = accountManager.getAccountById(accountId)