Loading app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ public abstract class K9Activity extends AppCompatActivity implements K9Activity super.onCreate(savedInstanceState); } @Override protected void onResume() { base.preOnResume(); super.onResume(); } @Override public boolean dispatchTouchEvent(MotionEvent event) { base.preDispatchTouchEvent(event); Loading app/ui/src/main/java/com/fsck/k9/activity/K9ActivityCommon.kt +14 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.view.MotionEvent import com.fsck.k9.K9 import com.fsck.k9.activity.misc.SwipeGestureDetector import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener import com.fsck.k9.ui.Theme import com.fsck.k9.ui.ThemeManager import org.koin.standalone.KoinComponent import org.koin.standalone.inject Loading @@ -25,6 +26,8 @@ class K9ActivityCommon( private val themeType: ThemeType ) { private var gestureDetector: GestureDetector? = null private lateinit var currentLanguage: String private lateinit var currentTheme: Theme val themeManager = Companion.themeManager Loading @@ -33,8 +36,12 @@ class K9ActivityCommon( * Call this before calling `super.onCreate(Bundle)`. */ fun preOnCreate() { setLanguage(K9.k9Language) K9.k9Language.let { language -> currentLanguage = language setLanguage(language) } currentTheme = themeManager.appTheme val theme = when (themeType) { ThemeType.DEFAULT -> themeManager.appThemeResourceId ThemeType.ACTION_BAR -> themeManager.appActionBarThemeResourceId Loading @@ -43,6 +50,12 @@ class K9ActivityCommon( activity.setTheme(theme) } fun preOnResume() { if (currentTheme != themeManager.appTheme || currentLanguage != K9.k9Language) { activity.recreate() } } /** * Call this before calling `super.dispatchTouchEvent(MotionEvent)`. */ Loading app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public abstract class K9PreferenceActivity extends AppCompatPreferenceActivity i @Override protected void onResume() { base.preOnResume(); super.onResume(); lifecycleRegistry.markState(State.RESUMED); } Loading app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java +6 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,12 @@ public class NotificationDeleteConfirmation extends AppCompatActivity { showDialog(DIALOG_CONFIRM); } @Override protected void onResume() { base.preOnResume(); super.onResume(); } private void extractExtras() { Intent intent = getIntent(); String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT_UUID); Loading app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java +6 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,12 @@ public class OpenPgpAppSelectDialog extends FragmentActivity { } } @Override protected void onResume() { base.preOnResume(); super.onResume(); } @Override protected void onStop() { isStopped = true; Loading Loading
app/ui/src/main/java/com/fsck/k9/activity/K9Activity.java +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ public abstract class K9Activity extends AppCompatActivity implements K9Activity super.onCreate(savedInstanceState); } @Override protected void onResume() { base.preOnResume(); super.onResume(); } @Override public boolean dispatchTouchEvent(MotionEvent event) { base.preDispatchTouchEvent(event); Loading
app/ui/src/main/java/com/fsck/k9/activity/K9ActivityCommon.kt +14 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.view.MotionEvent import com.fsck.k9.K9 import com.fsck.k9.activity.misc.SwipeGestureDetector import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener import com.fsck.k9.ui.Theme import com.fsck.k9.ui.ThemeManager import org.koin.standalone.KoinComponent import org.koin.standalone.inject Loading @@ -25,6 +26,8 @@ class K9ActivityCommon( private val themeType: ThemeType ) { private var gestureDetector: GestureDetector? = null private lateinit var currentLanguage: String private lateinit var currentTheme: Theme val themeManager = Companion.themeManager Loading @@ -33,8 +36,12 @@ class K9ActivityCommon( * Call this before calling `super.onCreate(Bundle)`. */ fun preOnCreate() { setLanguage(K9.k9Language) K9.k9Language.let { language -> currentLanguage = language setLanguage(language) } currentTheme = themeManager.appTheme val theme = when (themeType) { ThemeType.DEFAULT -> themeManager.appThemeResourceId ThemeType.ACTION_BAR -> themeManager.appActionBarThemeResourceId Loading @@ -43,6 +50,12 @@ class K9ActivityCommon( activity.setTheme(theme) } fun preOnResume() { if (currentTheme != themeManager.appTheme || currentLanguage != K9.k9Language) { activity.recreate() } } /** * Call this before calling `super.dispatchTouchEvent(MotionEvent)`. */ Loading
app/ui/src/main/java/com/fsck/k9/activity/K9PreferenceActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public abstract class K9PreferenceActivity extends AppCompatPreferenceActivity i @Override protected void onResume() { base.preOnResume(); super.onResume(); lifecycleRegistry.markState(State.RESUMED); } Loading
app/ui/src/main/java/com/fsck/k9/activity/NotificationDeleteConfirmation.java +6 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,12 @@ public class NotificationDeleteConfirmation extends AppCompatActivity { showDialog(DIALOG_CONFIRM); } @Override protected void onResume() { base.preOnResume(); super.onResume(); } private void extractExtras() { Intent intent = getIntent(); String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT_UUID); Loading
app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java +6 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,12 @@ public class OpenPgpAppSelectDialog extends FragmentActivity { } } @Override protected void onResume() { base.preOnResume(); super.onResume(); } @Override protected void onStop() { isStopped = true; Loading