Fixed theme reload issues. #100

Merged
AmineB merged 1 commits from fix-theme-reload into master 2022-11-11 20:29:18 +00:00
2 changed files with 9 additions and 17 deletions
Showing only changes of commit 87d1ef2bce - Show all commits
@@ -2,6 +2,7 @@ package bou.amine.apps.readerforselfossv2.android
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
@@ -38,7 +39,8 @@ class LoginActivity : AppCompatActivity(), DIAware {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
handleTheme()
binding = ActivityLoginBinding.inflate(layoutInflater)
val view = binding.root
@@ -56,6 +58,11 @@ class LoginActivity : AppCompatActivity(), DIAware {
handleActions()
}
@SuppressLint("WrongConstant") // Constant is fetched from the settings
private fun handleTheme() {
AppCompatDelegate.setDefaultNightMode(appSettingsService.getCurrentTheme())
}
private fun handleActions() {
binding.passwordView.setOnEditorActionListener(
Internal Server Error - Amine's git
500 Internal Server Error

Gitea Version: 1.28.0+dev-211-ga30d865b78