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:
Konrad Pozniak 2024-01-04 17:00:55 +01:00 committed by GitHub
commit 5192fb08a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
215 changed files with 2813 additions and 1177 deletions

View file

@ -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

View file

@ -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"