Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add gated BG sync notification

Prateek Sunalc90483f2b0cb
diff --git a/mobile/apps/photos/lib/ui/settings/debug/debug_settings_page.dart b/mobile/apps/photos/lib/ui/settings/debug/debug_settings_page.dart
index b67f0b022e..7f6e83d4e3 100644
--- a/mobile/apps/photos/lib/ui/settings/debug/debug_settings_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/debug/debug_settings_page.dart
@@ -108,30 +108,35 @@ class _DebugSettingsPageState extends State<DebugSettingsPage> {
},
),
),
- MenuItemWidgetNew(
- title: "Background sync notification",
- leadingIconWidget: _buildIconWidget(
- context,
- HugeIcons.strokeRoundedNotification01,
- ),
- trailingWidget: ToggleSwitchWidget(
- value: () =>
- localSettings.isBGDebugNotificationsEnabled,
- onChanged: () async {
- final newValue =
- !localSettings.isBGDebugNotificationsEnabled;
- await localSettings
- .setBGDebugNotificationsEnabled(newValue);
- setState(() {});
- showShortToast(
- context,
- newValue
- ? "Background debug notifications enabled. Restart app."
- : "Background debug notifications disabled. Restart app.",
- );
- },
+ if (flagService.flags.internalUser)
+ MenuItemWidgetNew(
+ title: "Background sync notification",
+ leadingIconWidget: _buildIconWidget(
+ context,
+ HugeIcons.strokeRoundedNotification01,
+ ),
+ trailingWidget: ToggleSwitchWidget(
+ value: () =>
+ localSettings
+ .isBGDebugNotificationsEnabled,
+ onChanged: () async {
+ final newValue =
+ !localSettings
+ .isBGDebugNotificationsEnabled;
+ await localSettings
+ .setBGDebugNotificationsEnabled(
+ newValue,
+ );
+ setState(() {});
+ showShortToast(
+ context,
+ newValue
+ ? "Background debug notifications enabled. Restart app."
+ : "Background debug notifications disabled. Restart app.",
+ );
+ },
+ ),
),
- ),
MenuItemWidgetNew(
title: "Enable database logging",
leadingIconWidget: _buildIconWidget(