Skip to content

Commit 1920b3d

Browse files
committed
Don't restart the server after editing configuration if it was stopped via notification or QS Tile
1 parent 7a77439 commit 1920b3d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/src/main/java/io/github/krlvm/powertunnel/android/activities/MainActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,13 @@ protected void onResume() {
208208
}
209209

210210
if(restartServerOnResume) {
211-
Toast.makeText(this, R.string.toast_configure_while_running_restart, Toast.LENGTH_LONG).show();
212-
doStop();
211+
if (!PowerTunnelService.isRunning()) {
212+
restartServerOnResume = false;
213+
unlockConfigurationWhenRunning = false;
214+
} else {
215+
Toast.makeText(this, R.string.toast_configure_while_running_restart, Toast.LENGTH_LONG).show();
216+
doStop();
217+
}
213218
}
214219
}
215220

0 commit comments

Comments
 (0)