Skip to content

Commit

Permalink
Appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakoja committed Jan 18, 2025
1 parent c7b0f36 commit 899df36
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

package com.keylesspalace.tusky

import android.Manifest
import android.annotation.SuppressLint
import android.app.NotificationManager
import android.content.Context
Expand All @@ -27,6 +26,7 @@ import android.graphics.Color
import android.graphics.drawable.Animatable
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.Manifest
import android.net.Uri
import android.os.Build
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.keylesspalace.tusky

import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.util.Log
import androidx.hilt.work.HiltWorkerFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NotificationService @Inject constructor(
private val api: MastodonApi,
@ApplicationContext private val context: Context,
) {
private var notificationId:Int = NOTIFICATION_ID_PRUNE_CACHE + 1
private var notificationId: Int = NOTIFICATION_ID_PRUNE_CACHE + 1

init {
createWorkerNotificationChannel()
Expand Down Expand Up @@ -196,8 +196,10 @@ class NotificationService @Inject constructor(

val workRequest: WorkRequest = PeriodicWorkRequest.Builder(
NotificationWorker::class.java,
PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS, TimeUnit.MILLISECONDS,
PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS, TimeUnit.MILLISECONDS
PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS,
TimeUnit.MILLISECONDS,
PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS,
TimeUnit.MILLISECONDS,
)
.addTag(NOTIFICATION_PULL_TAG)
.setConstraints(Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build())
Expand Down Expand Up @@ -372,11 +374,13 @@ class NotificationService @Inject constructor(
builder.addAction(composeAction)
}

builder.addExtras(Bundle().apply {
// Add the sending account's name, so it can be used also later when summarising this notification
putString(EXTRA_ACCOUNT_NAME, body.account.name)
putString(EXTRA_NOTIFICATION_TYPE, body.type.name)
})
builder.addExtras(
Bundle().apply {
// Add the sending account's name, so it can be used also later when summarising this notification
putString(EXTRA_ACCOUNT_NAME, body.account.name)
putString(EXTRA_NOTIFICATION_TYPE, body.type.name)
}
)

return builder.build()
}
Expand Down Expand Up @@ -738,7 +742,6 @@ class NotificationService @Inject constructor(
disablePullNotifications()
}


//
// Push notification section
//
Expand Down Expand Up @@ -881,7 +884,6 @@ class NotificationService @Inject constructor(
}
}


companion object {
const val TAG = "NotificationService"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@ class UnifiedPushBroadcastReceiver : MessagingReceiver() {

companion object {
const val TAG = "UnifiedPush"

}
}

0 comments on commit 899df36

Please sign in to comment.