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
2 changed files with 9 additions and 1 deletions
|
@ -126,7 +126,7 @@ class DownloadCache(
|
||||||
//rootDir.files = sourceDirs
|
//rootDir.files = sourceDirs
|
||||||
|
|
||||||
val db:DatabaseHelper by injectLazy()
|
val db:DatabaseHelper by injectLazy()
|
||||||
val mangas = db.getLibraryMangas().executeAsBlocking()
|
val mangas = db.getMangas().executeAsBlocking()
|
||||||
|
|
||||||
sourceDirs.forEach { sourceValue ->
|
sourceDirs.forEach { sourceValue ->
|
||||||
val sourceDir = sourceValue.value
|
val sourceDir = sourceValue.value
|
||||||
|
|
|
@ -20,6 +20,7 @@ import android.view.WindowManager
|
||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.biometric.BiometricManager
|
import androidx.biometric.BiometricManager
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
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.
|
* Called when the activity is created. Initializes the presenter and configuration.
|
||||||
*/
|
*/
|
||||||
override fun onCreate(savedState: Bundle?) {
|
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()) {
|
setTheme(when (preferences.readerTheme().getOrDefault()) {
|
||||||
0 -> R.style.Theme_Base_Reader_Light
|
0 -> R.style.Theme_Base_Reader_Light
|
||||||
1 -> R.style.Theme_Base_Reader_Dark
|
1 -> R.style.Theme_Base_Reader_Dark
|
||||||
|
|
Reference in a new issue