-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: back press handling in settings activity #15949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: alperozturk <[email protected]>
|
/backport to stable-3.34 |
Signed-off-by: alperozturk <[email protected]>
|
|
||
| @SuppressLint("GestureBackNavigation") | ||
| @Override | ||
| public void onBackPressed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to override the back press behavior, since the back press will handle itself and display whatever is in the stack.
| contactsPreferenceActivity.finish() | ||
| } else { | ||
| val settingsIntent = Intent(context, SettingsActivity::class.java) | ||
| settingsIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't clear stack so that we can go back from SettingsActivity
| handleMnemonicRequest(data); | ||
| } else if (requestCode == ACTION_E2E && data != null && data.getBooleanExtra(SetupEncryptionDialogFragment.SUCCESS, false)) { | ||
| Intent i = new Intent(this, SettingsActivity.class); | ||
| i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't clear stack so that we can go back from SettingsActivity
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15949.apk |

Fixes
Fixes drawer menu highlighting and transition from
SettingsActivity.Old related PR: #15384