Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 465ee929 authored by stefan-niedermann's avatar stefan-niedermann
Browse files

#519 Synchronize on WiFi only

- Update documentation
parent 4b4c639a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ public class NoteServerSyncHelper {
    private String syncOnlyOnWifiKey;
    private boolean syncOnlyOnWifi;

    /**
     * @see <a href="https://stackoverflow.com/a/3104265">Do not make this a local variable.</a>
     */
    private SharedPreferences.OnSharedPreferenceChangeListener onSharedPreferenceChangeListener = (SharedPreferences prefs, String key) -> {
        if (syncOnlyOnWifiKey.equals(key)) {
            syncOnlyOnWifi = prefs.getBoolean(syncOnlyOnWifiKey, false);