Skip to content

Commit

Permalink
Remove non-functional restartOnWakeup from app settings (fixes #1961)
Browse files Browse the repository at this point in the history
The option "restartOnWakeup" was removed in Syncthing v1.21.0 [1]. Thus,
remove it from the Android app as well, since the option does not
perform any function anymore. In addition, update the Docs also [2].

[1] syncthing/syncthing#8448
[2] syncthing/docs#815

Signed-off-by: Tomasz Wilczyński <[email protected]>
  • Loading branch information
tomasz1986 committed Aug 16, 2023
1 parent a7bfd72 commit 82899bd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public static class SettingsFragment extends PreferenceFragment
private CheckBoxPreference mRelaysEnabled;
private EditTextPreference mGlobalAnnounceServers;
private EditTextPreference mAddress;
private CheckBoxPreference mRestartOnWakeup;
private CheckBoxPreference mUrAccepted;

private Preference mCategoryBackup;
Expand Down Expand Up @@ -214,7 +213,6 @@ public void onActivityCreated(Bundle savedInstanceState) {
mRelaysEnabled = (CheckBoxPreference) findPreference("relaysEnabled");
mGlobalAnnounceServers = (EditTextPreference) findPreference("globalAnnounceServers");
mAddress = (EditTextPreference) findPreference("address");
mRestartOnWakeup = (CheckBoxPreference) findPreference("restartOnWakeup");
mUrAccepted = (CheckBoxPreference) findPreference("urAccepted");

mCategoryBackup = findPreference("category_backup");
Expand Down Expand Up @@ -352,7 +350,6 @@ public void onServiceStateChange(SyncthingService.State currentState) {
mRelaysEnabled.setChecked(mOptions.relaysEnabled);
mGlobalAnnounceServers.setText(joiner.join(mOptions.globalAnnounceServers));
mAddress.setText(mGui.address);
mRestartOnWakeup.setChecked(mOptions.restartOnWakeup);
mApi.getSystemInfo(systemInfo ->
mUrAccepted.setChecked(mOptions.isUsageReportingAccepted(systemInfo.urVersionMax)));
}
Expand Down Expand Up @@ -457,9 +454,6 @@ public boolean onSyncthingPreferenceChange(Preference preference, Object o) {
case "address":
mGui.address = (String) o;
break;
case "restartOnWakeup":
mOptions.restartOnWakeup = (boolean) o;
break;
case "urAccepted":
mApi.getSystemInfo(systemInfo -> {
mOptions.urAccepted = ((boolean) o)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class Options {
public String urURL;
public boolean urPostInsecurely;
public int urInitialDelayS;
public boolean restartOnWakeup;
public int autoUpgradeIntervalH;
public int keepTemporariesH;
public boolean cacheIgnoredFiles;
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,6 @@ Please report any problems you encounter via Github.</string>

<string name="use_legacy_hashing_summary">Force Syncthing to use legacy hashing package for compatibility purposes</string>

<string name="restart_on_wakeup_title">Restart on Wakeup</string>

<string name="restart_on_wakeup_summary">Default: Enabled. Disabling this feature may result in folder scans and device reconnects being delayed to save battery.</string>

<!-- Dialog shown before config export -->
<string name="dialog_confirm_export">Do you really want to export your configuration? Existing files will be overwritten.\n\nWARNING! Other applications may be able to read the private key from the backup location and use it to download/modify synchronized files.</string>

Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/xml/app_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@
android:persistent="false"
android:inputType="textNoSuggestions" />

<CheckBoxPreference
android:key="restartOnWakeup"
android:title="@string/restart_on_wakeup_title"
android:summary="@string/restart_on_wakeup_summary"
android:defaultValue="false" />

<CheckBoxPreference
android:key="urAccepted"
android:title="@string/usage_reporting"
Expand Down

0 comments on commit 82899bd

Please sign in to comment.