Minor cleanup

(cherry picked from commit 81448f5d01ba6c6fb69de10118519c1036c46965)
This commit is contained in:
arkon 2023-10-12 22:43:03 -04:00 committed by Jobobby04
parent 7693076c89
commit 40b93cc26c
2 changed files with 10 additions and 7 deletions

View File

@ -294,7 +294,7 @@ class BackupCreator(
private fun backupSourcePreferences(flags: Int): List<BackupSourcePreferences> { private fun backupSourcePreferences(flags: Int): List<BackupSourcePreferences> {
if (flags and BACKUP_SOURCE_PREFS_MASK != BACKUP_SOURCE_PREFS) return emptyList() if (flags and BACKUP_SOURCE_PREFS_MASK != BACKUP_SOURCE_PREFS) return emptyList()
return sourceManager.getOnlineSources() return sourceManager.getCatalogueSources()
.filterIsInstance<ConfigurableSource>() .filterIsInstance<ConfigurableSource>()
.map { .map {
BackupSourcePreferences( BackupSourcePreferences(

View File

@ -95,6 +95,7 @@ import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import logcat.LogPriority import logcat.LogPriority
import tachiyomi.core.Constants import tachiyomi.core.Constants
import tachiyomi.core.util.lang.launchIO
import tachiyomi.core.util.system.logcat import tachiyomi.core.util.system.logcat
import tachiyomi.domain.UnsortedPreferences import tachiyomi.domain.UnsortedPreferences
import tachiyomi.domain.library.service.LibraryPreferences import tachiyomi.domain.library.service.LibraryPreferences
@ -337,7 +338,9 @@ class MainActivity : BaseActivity() {
setSplashScreenExitAnimation(splashScreen) setSplashScreenExitAnimation(splashScreen)
if (isLaunch && libraryPreferences.autoClearChapterCache().get()) { if (isLaunch && libraryPreferences.autoClearChapterCache().get()) {
chapterCache.clear() lifecycleScope.launchIO {
chapterCache.clear()
}
} }
// SY --> // SY -->
@ -509,13 +512,13 @@ class MainActivity : BaseActivity() {
// SY <-- // SY <--
companion object { companion object {
// Splash screen
private const val SPLASH_MIN_DURATION = 500 // ms
private const val SPLASH_MAX_DURATION = 5000 // ms
private const val SPLASH_EXIT_ANIM_DURATION = 400L // ms
const val INTENT_SEARCH = "eu.kanade.tachiyomi.SEARCH" const val INTENT_SEARCH = "eu.kanade.tachiyomi.SEARCH"
const val INTENT_SEARCH_QUERY = "query" const val INTENT_SEARCH_QUERY = "query"
const val INTENT_SEARCH_FILTER = "filter" const val INTENT_SEARCH_FILTER = "filter"
} }
} }
// Splash screen
private const val SPLASH_MIN_DURATION = 500 // ms
private const val SPLASH_MAX_DURATION = 5000 // ms
private const val SPLASH_EXIT_ANIM_DURATION = 400L // ms