mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-11 21:10:49 +01:00
Minor changes
This commit is contained in:
parent
3a1699f0b3
commit
beca2b429c
3 changed files with 7 additions and 2 deletions
|
@ -28,6 +28,7 @@ class SettingsActivity : BaseActivity(),
|
||||||
override fun onCreate(savedState: Bundle?) {
|
override fun onCreate(savedState: Bundle?) {
|
||||||
setAppTheme()
|
setAppTheme()
|
||||||
super.onCreate(savedState)
|
super.onCreate(savedState)
|
||||||
|
setTitle(R.string.label_settings)
|
||||||
setContentView(R.layout.activity_preferences)
|
setContentView(R.layout.activity_preferences)
|
||||||
|
|
||||||
replaceFragmentStrategy = ReplaceFragment(this,
|
replaceFragmentStrategy = ReplaceFragment(this,
|
||||||
|
|
|
@ -44,6 +44,11 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
||||||
// Chapters from the db not in the source.
|
// Chapters from the db not in the source.
|
||||||
val toDelete = dbChapters.filterNot { it in sourceChapters }
|
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>()
|
val readded = mutableListOf<Chapter>()
|
||||||
|
|
||||||
db.inTransaction {
|
db.inTransaction {
|
||||||
|
|
|
@ -78,8 +78,7 @@ object LocaleHelper {
|
||||||
if (systemLocale == null) {
|
if (systemLocale == null) {
|
||||||
systemLocale = getConfigLocale(config)
|
systemLocale = getConfigLocale(config)
|
||||||
}
|
}
|
||||||
// In API 16 and lower [systemLocale] can't be changed.
|
if (configChange) {
|
||||||
if (configChange && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
|
||||||
val configLocale = getConfigLocale(config)
|
val configLocale = getConfigLocale(config)
|
||||||
if (currentLocale == configLocale) {
|
if (currentLocale == configLocale) {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue