chore: lint.

Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
KaiserBh 2023-11-14 16:09:33 +11:00
parent 0016f1e335
commit 38609e8907
No known key found for this signature in database
GPG Key ID: 14D73B142042BBA9
3 changed files with 12 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Environment import android.os.Environment
import android.text.format.DateUtils
import android.text.format.Formatter import android.text.format.Formatter
import android.widget.Toast import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
@ -516,7 +515,9 @@ private fun getAutomaticSyncGroup(syncPreferences: SyncPreferences): Preference.
true true
}, },
), ),
Preference.PreferenceItem.InfoPreference(stringResource(R.string.last_synchronization, relativeTimeSpanString(lastSync))), Preference.PreferenceItem.InfoPreference(
stringResource(R.string.last_synchronization, relativeTimeSpanString(lastSync)),
),
), ),
) )
} }

View File

@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.data.sync
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.backup.BackupCreateFlags import eu.kanade.tachiyomi.data.backup.BackupCreateFlags
import eu.kanade.tachiyomi.data.backup.BackupCreator import eu.kanade.tachiyomi.data.backup.BackupCreator
import eu.kanade.tachiyomi.data.backup.BackupNotifier import eu.kanade.tachiyomi.data.backup.BackupNotifier

View File

@ -1,7 +1,7 @@
package tachiyomi.domain.sync package tachiyomi.domain.sync
import tachiyomi.core.preference.PreferenceStore
import tachiyomi.core.preference.Preference import tachiyomi.core.preference.Preference
import tachiyomi.core.preference.PreferenceStore
class SyncPreferences( class SyncPreferences(
private val preferenceStore: PreferenceStore, private val preferenceStore: PreferenceStore,
@ -19,7 +19,10 @@ class SyncPreferences(
fun syncService() = preferenceStore.getInt("sync_service", 0) fun syncService() = preferenceStore.getInt("sync_service", 0)
private fun googleDriveAccessToken() = preferenceStore.getString(Preference.appStateKey("google_drive_access_token"), "") private fun googleDriveAccessToken() = preferenceStore.getString(
Preference.appStateKey("google_drive_access_token"),
"",
)
fun setGoogleDriveAccessToken(accessToken: String) { fun setGoogleDriveAccessToken(accessToken: String) {
googleDriveAccessToken().set(accessToken) googleDriveAccessToken().set(accessToken)
@ -27,7 +30,10 @@ class SyncPreferences(
fun getGoogleDriveAccessToken() = googleDriveAccessToken().get() fun getGoogleDriveAccessToken() = googleDriveAccessToken().get()
private fun googleDriveRefreshToken() = preferenceStore.getString(Preference.appStateKey("google_drive_refresh_token"), "") private fun googleDriveRefreshToken() = preferenceStore.getString(
Preference.appStateKey("google_drive_refresh_token"),
"",
)
fun setGoogleDriveRefreshToken(refreshToken: String) { fun setGoogleDriveRefreshToken(refreshToken: String) {
googleDriveRefreshToken().set(refreshToken) googleDriveRefreshToken().set(refreshToken)