File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ abstract class Prefs {
62
62
63
63
static late final PlainPref <Uint8List ?> pfp;
64
64
static late final PlainPref <bool > syncInBackground;
65
+ static late final PlainPref <bool > onlySyncOverWifi;
65
66
66
67
static late final PlainPref <ThemeMode > appTheme;
67
68
@@ -168,6 +169,7 @@ abstract class Prefs {
168
169
169
170
pfp = PlainPref ('pfp' , null );
170
171
syncInBackground = PlainPref ('syncInBackground' , true );
172
+ onlySyncOverWifi = PlainPref ('onlySyncOverWifi' , true );
171
173
172
174
appTheme = PlainPref ('appTheme' , ThemeMode .system);
173
175
platform = PlainPref ('platform' , defaultTargetPlatform);
Original file line number Diff line number Diff line change @@ -329,6 +329,15 @@ class _SettingsPageState extends State<SettingsPage> {
329
329
},
330
330
pref: Prefs .hyperlegibleFont,
331
331
),
332
+ SettingsSwitch (
333
+ title: 'Sync notes only over WiFi' ,
334
+ subtitle: 'If disabled mobile data may be used to sync notes' ,
335
+ iconBuilder: (i) => switch (Prefs .platform.value) {
336
+ TargetPlatform .iOS || TargetPlatform .macOS => Icons .wifi_rounded,
337
+ _ => Icons .wifi_sharp,
338
+ },
339
+ pref: Prefs .onlySyncOverWifi,
340
+ ),
332
341
SettingsSubtitle (subtitle: t.settings.prefCategories.writing),
333
342
SettingsSwitch (
334
343
title: t.settings.prefLabels.preferGreyscale,
You can’t perform that action at this time.
0 commit comments