mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 03:11:30 +00:00
Rename RestApi.restart to RestApi.saveConfigAndRestart (#1158)
This commit is contained in:
parent
73e32ce5d0
commit
0f954c07fb
3 changed files with 3 additions and 3 deletions
|
@ -493,7 +493,7 @@ public class MainActivity extends StateDialogActivity
|
|||
break;
|
||||
}
|
||||
getApi().editSettings(getApi().getGui(), options);
|
||||
getApi().restart();
|
||||
getApi().saveConfigAndRestart();
|
||||
};
|
||||
|
||||
getApi().getUsageReport(report -> {
|
||||
|
|
|
@ -378,7 +378,7 @@ public class SettingsActivity extends SyncthingActivity {
|
|||
if (mRequireRestart) {
|
||||
if (mSyncthingService != null && mApi != null &&
|
||||
mSyncthingService.getCurrentState() != SyncthingService.State.DISABLED) {
|
||||
mApi.restart();
|
||||
mApi.saveConfigAndRestart();
|
||||
mRequireRestart = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ public class RestApi {
|
|||
/**
|
||||
* Sends current config and restarts Syncthing.
|
||||
*/
|
||||
public void restart() {
|
||||
public void saveConfigAndRestart() {
|
||||
new PostConfigRequest(mContext, mUrl, mApiKey, new Gson().toJson(mConfig), result -> {
|
||||
Intent intent = new Intent(mContext, SyncthingService.class)
|
||||
.setAction(SyncthingService.ACTION_RESTART);
|
||||
|
|
Loading…
Reference in a new issue