summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/activity/MainActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/activity/MainActivity.java b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
index 9494dd22..21bec130 100644
--- a/app/src/main/java/com/wireguard/android/activity/MainActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
@@ -35,11 +35,11 @@ public class MainActivity extends BaseActivity {
private State state = State.EMPTY;
private boolean moveToState(final State nextState) {
+ if (state == nextState)
+ return false;
final FragmentManager fragmentManager = getSupportFragmentManager();
Log.i(TAG, "Moving from " + state.name() + " to " + nextState.name());
- if (nextState == state) {
- return false;
- } else if (nextState.layer > state.layer + 1) {
+ if (nextState.layer > state.layer + 1) {
moveToState(State.ofLayer(state.layer + 1));
moveToState(nextState);
return true;