update to SDK 30 and fix deprecations (#2173)

* update to SDk 30 and fix deprecations

* remove unnecessary .run

* revert ViewMediaActivity change
This commit is contained in:
Konrad Pozniak 2021-06-01 19:46:07 +02:00 committed by GitHub
commit 3301643c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 33 deletions

View file

@ -51,8 +51,8 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
val senderFullName = intent.getStringExtra(NotificationHelper.KEY_SENDER_ACCOUNT_FULL_NAME)
val citedStatusId = intent.getStringExtra(NotificationHelper.KEY_CITED_STATUS_ID)
val visibility = intent.getSerializableExtra(NotificationHelper.KEY_VISIBILITY) as Status.Visibility
val spoiler = intent.getStringExtra(NotificationHelper.KEY_SPOILER)
val mentions = intent.getStringArrayExtra(NotificationHelper.KEY_MENTIONS)
val spoiler = intent.getStringExtra(NotificationHelper.KEY_SPOILER) ?: ""
val mentions = intent.getStringArrayExtra(NotificationHelper.KEY_MENTIONS) ?: emptyArray()
val citedText = intent.getStringExtra(NotificationHelper.KEY_CITED_TEXT)
val localAuthorId = intent.getStringExtra(NotificationHelper.KEY_CITED_AUTHOR_LOCAL)
@ -69,7 +69,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
val builder = NotificationCompat.Builder(context, NotificationHelper.CHANNEL_MENTION + senderIdentifier)
.setSmallIcon(R.drawable.ic_notify)
.setColor(ContextCompat.getColor(context, (R.color.tusky_blue)))
.setColor(ContextCompat.getColor(context, R.color.tusky_blue))
.setGroup(senderFullName)
.setDefaults(0) // So it doesn't ring twice, notify only in Target callback