Skip to content

Commit

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

package com.keylesspalace.tusky

import com.google.android.material.R as materialR
import android.Manifest
import android.annotation.SuppressLint
import android.app.NotificationManager
Expand All @@ -40,6 +41,7 @@ import android.view.MenuItem.SHOW_AS_ACTION_NEVER
import android.view.View
import android.widget.ImageView
import androidx.activity.OnBackPressedCallback
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.content.res.AppCompatResources
Expand All @@ -57,8 +59,6 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.target.FixedSizeDrawable
import com.bumptech.glide.request.transition.Transition
import com.google.android.material.R as materialR
import androidx.activity.result.contract.ActivityResultContracts
import com.google.android.material.color.MaterialColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.tabs.TabLayout
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 1919543

Please sign in to comment.