mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Minor changes
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user