upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the max line length which I had to disable because we are over it in a lot of places. --------- Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
parent
33cd6fdb98
commit
5192fb08a5
215 changed files with 2813 additions and 1177 deletions
|
|
@ -34,14 +34,20 @@ class NotificationWorker(
|
|||
params: WorkerParameters,
|
||||
private val notificationsFetcher: NotificationFetcher
|
||||
) : CoroutineWorker(appContext, params) {
|
||||
val notification: Notification = NotificationHelper.createWorkerNotification(applicationContext, R.string.notification_notification_worker)
|
||||
val notification: Notification = NotificationHelper.createWorkerNotification(
|
||||
applicationContext,
|
||||
R.string.notification_notification_worker
|
||||
)
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
notificationsFetcher.fetchAndShow()
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
override suspend fun getForegroundInfo() = ForegroundInfo(NOTIFICATION_ID_FETCH_NOTIFICATION, notification)
|
||||
override suspend fun getForegroundInfo() = ForegroundInfo(
|
||||
NOTIFICATION_ID_FETCH_NOTIFICATION,
|
||||
notification
|
||||
)
|
||||
|
||||
class Factory @Inject constructor(
|
||||
private val notificationsFetcher: NotificationFetcher
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ class PruneCacheWorker(
|
|||
private val appDatabase: AppDatabase,
|
||||
private val accountManager: AccountManager
|
||||
) : CoroutineWorker(appContext, workerParams) {
|
||||
val notification: Notification = NotificationHelper.createWorkerNotification(applicationContext, R.string.notification_prune_cache)
|
||||
val notification: Notification = NotificationHelper.createWorkerNotification(
|
||||
applicationContext,
|
||||
R.string.notification_prune_cache
|
||||
)
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
for (account in accountManager.accounts) {
|
||||
|
|
@ -48,7 +51,10 @@ class PruneCacheWorker(
|
|||
return Result.success()
|
||||
}
|
||||
|
||||
override suspend fun getForegroundInfo() = ForegroundInfo(NOTIFICATION_ID_PRUNE_CACHE, notification)
|
||||
override suspend fun getForegroundInfo() = ForegroundInfo(
|
||||
NOTIFICATION_ID_PRUNE_CACHE,
|
||||
notification
|
||||
)
|
||||
|
||||
companion object {
|
||||
private const val TAG = "PruneCacheWorker"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue