diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt index 40333ee2c3..695b608bbd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt @@ -155,7 +155,7 @@ class NotificationReceiver : BroadcastReceiver() { * @param mangaId id of manga * @param chapterId id of chapter */ - internal fun openChapter(context: Context, mangaId: Long, chapterId: Long) { + private fun openChapter(context: Context, mangaId: Long, chapterId: Long) { val db = DatabaseHelper(context) val manga = db.getManga(mangaId).executeAsBlocking() val chapter = db.getChapter(chapterId).executeAsBlocking() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/SharedPreferencesDataStore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/SharedPreferencesDataStore.kt index 7c3295f21f..ae11e587de 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/SharedPreferencesDataStore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/SharedPreferencesDataStore.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.data.preference import android.content.SharedPreferences +import androidx.core.content.edit import androidx.preference.PreferenceDataStore class SharedPreferencesDataStore(private val prefs: SharedPreferences) : PreferenceDataStore() { @@ -10,7 +11,9 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putBoolean(key: String?, value: Boolean) { - prefs.edit().putBoolean(key, value).apply() + prefs.edit { + putBoolean(key, value) + } } override fun getInt(key: String?, defValue: Int): Int { @@ -18,7 +21,9 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putInt(key: String?, value: Int) { - prefs.edit().putInt(key, value).apply() + prefs.edit { + putInt(key, value) + } } override fun getLong(key: String?, defValue: Long): Long { @@ -26,7 +31,9 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putLong(key: String?, value: Long) { - prefs.edit().putLong(key, value).apply() + prefs.edit { + putLong(key, value) + } } override fun getFloat(key: String?, defValue: Float): Float { @@ -34,7 +41,9 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putFloat(key: String?, value: Float) { - prefs.edit().putFloat(key, value).apply() + prefs.edit { + putFloat(key, value) + } } override fun getString(key: String?, defValue: String?): String? { @@ -42,7 +51,9 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putString(key: String?, value: String?) { - prefs.edit().putString(key, value).apply() + prefs.edit { + putString(key, value) + } } override fun getStringSet(key: String?, defValues: MutableSet?): MutableSet? { @@ -50,6 +61,8 @@ class SharedPreferencesDataStore(private val prefs: SharedPreferences) : Prefere } override fun putStringSet(key: String?, values: MutableSet?) { - prefs.edit().putStringSet(key, values).apply() + prefs.edit { + putStringSet(key, values) + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/devrepo/DevRepoUpdateChecker.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/devrepo/DevRepoUpdateChecker.kt index 88084a234a..c224ba4578 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/devrepo/DevRepoUpdateChecker.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/devrepo/DevRepoUpdateChecker.kt @@ -26,7 +26,7 @@ class DevRepoUpdateChecker : UpdateChecker() { override suspend fun checkForUpdate(): UpdateResult { val response = withContext(Dispatchers.IO) { - client.newCall(GET(DevRepoRelease.LATEST_URL)).await(assertSuccess = false) + client.newCall(GET(DevRepoRelease.LATEST_URL)).await() } // Get latest repo version number from header in format "Location: tachiyomi-r1512.apk" diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt index 7bbd846954..20dfd14c49 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt @@ -32,7 +32,7 @@ internal object ExtensionLoader { private const val PACKAGE_FLAGS = PackageManager.GET_CONFIGURATIONS or PackageManager.GET_SIGNATURES // inorichi's key - val officialSignature = "7ce04da7773d41b489f4693a366c36bcd0a11fc39b547168553c285bd7348e23" + private const val officialSignature = "7ce04da7773d41b489f4693a366c36bcd0a11fc39b547168553c285bd7348e23" /** * List of the trusted signatures. */ diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt index a1b3bf2b5d..b3fb931ba1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt @@ -17,10 +17,7 @@ class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs // Background is controlled with "swipeRefreshLayoutProgressSpinnerBackgroundColor" in XML // This updates the progress arrow color - setColorSchemeColors( - ContextCompat.getColor(context, R.color.md_white_1000), - ContextCompat.getColor(context, R.color.md_white_1000), - ContextCompat.getColor(context, R.color.md_white_1000) - ) + val white = ContextCompat.getColor(context, R.color.md_white_1000) + setColorSchemeColors(white, white, white) } }