Don't finish() to allow recreate

when orientation change is on foot
This commit is contained in:
devlearner 2022-10-16 01:01:19 +08:00 committed by Stypox
parent 94cc1f2982
commit c173e04aa4

View file

@ -161,6 +161,14 @@ public class RouterActivity extends AppCompatActivity {
disposables.clear();
}
@Override
public void finish() {
// allow the activity to recreate in case orientation changes
if (!isChangingConfigurations()) {
super.finish();
}
}
private void handleUrl(final String url) {
disposables.add(Observable
.fromCallable(() -> {