mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:39:18 +01:00
Minor changes
This commit is contained in:
parent
3a1699f0b3
commit
beca2b429c
@ -28,6 +28,7 @@ class SettingsActivity : BaseActivity(),
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
setAppTheme()
|
||||
super.onCreate(savedState)
|
||||
setTitle(R.string.label_settings)
|
||||
setContentView(R.layout.activity_preferences)
|
||||
|
||||
replaceFragmentStrategy = ReplaceFragment(this,
|
||||
|
@ -44,6 +44,11 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
||||
// Chapters from the db not in the source.
|
||||
val toDelete = dbChapters.filterNot { it in sourceChapters }
|
||||
|
||||
// Return if there's nothing to add or delete, avoiding unnecessary db transactions.
|
||||
if (toAdd.isEmpty() && toDelete.isEmpty()) {
|
||||
return Pair(emptyList(), emptyList())
|
||||
}
|
||||
|
||||
val readded = mutableListOf<Chapter>()
|
||||
|
||||
db.inTransaction {
|
||||
|
@ -78,8 +78,7 @@ object LocaleHelper {
|
||||
if (systemLocale == null) {
|
||||
systemLocale = getConfigLocale(config)
|
||||
}
|
||||
// In API 16 and lower [systemLocale] can't be changed.
|
||||
if (configChange && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
if (configChange) {
|
||||
val configLocale = getConfigLocale(config)
|
||||
if (currentLocale == configLocale) {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user