mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:35:10 +01:00
Fixed Issue of reader not following theme on app relaunch from memory
Cache now checks for downloads outside of library too
This commit is contained in:
parent
27fbcf2082
commit
0aca015171
@ -126,7 +126,7 @@ class DownloadCache(
|
||||
//rootDir.files = sourceDirs
|
||||
|
||||
val db:DatabaseHelper by injectLazy()
|
||||
val mangas = db.getLibraryMangas().executeAsBlocking()
|
||||
val mangas = db.getMangas().executeAsBlocking()
|
||||
|
||||
sourceDirs.forEach { sourceValue ->
|
||||
val sourceDir = sourceValue.value
|
||||
|
@ -20,6 +20,7 @@ import android.view.WindowManager
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.AnimationUtils
|
||||
import android.widget.SeekBar
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.biometric.BiometricManager
|
||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
@ -150,6 +151,13 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
* Called when the activity is created. Initializes the presenter and configuration.
|
||||
*/
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
AppCompatDelegate.setDefaultNightMode(
|
||||
when (preferences.theme()) {
|
||||
1 -> AppCompatDelegate.MODE_NIGHT_NO
|
||||
2, 3, 4 -> AppCompatDelegate.MODE_NIGHT_YES
|
||||
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
|
||||
}
|
||||
)
|
||||
setTheme(when (preferences.readerTheme().getOrDefault()) {
|
||||
0 -> R.style.Theme_Base_Reader_Light
|
||||
1 -> R.style.Theme_Base_Reader_Dark
|
||||
|
Loading…
Reference in New Issue
Block a user