mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
feat: Add Sensor telemetry alerts
ref:
This commit is contained in:
@@ -80,6 +80,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
bool _openMapInFullscreen = false;
|
||||
bool _messageNotificationsEnabled = true;
|
||||
bool _sarNotificationsEnabled = true;
|
||||
bool _discoveryNotificationsEnabled = true;
|
||||
bool _updateNotificationsEnabled = true;
|
||||
bool _muteForegroundNotifications = true;
|
||||
bool _isDeveloperModeEnabled = false;
|
||||
@@ -149,6 +150,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
setState(() {
|
||||
_messageNotificationsEnabled = service.messageNotificationsEnabled;
|
||||
_sarNotificationsEnabled = service.sarNotificationsEnabled;
|
||||
_discoveryNotificationsEnabled = service.discoveryNotificationsEnabled;
|
||||
_updateNotificationsEnabled = service.updateNotificationsEnabled;
|
||||
_muteForegroundNotifications = service.muteForegroundNotifications;
|
||||
});
|
||||
@@ -1052,6 +1054,22 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
},
|
||||
),
|
||||
SwitchListTile(
|
||||
SwitchListTile(
|
||||
secondary: const Icon(Icons.contact_page_outlined),
|
||||
title: const Text('Discovery notifications'),
|
||||
subtitle: const Text(
|
||||
'Notify when new contacts appear in Discovery',
|
||||
),
|
||||
value: _discoveryNotificationsEnabled,
|
||||
onChanged: (value) async {
|
||||
setState(() {
|
||||
_discoveryNotificationsEnabled = value;
|
||||
});
|
||||
await NotificationService().setDiscoveryNotificationsEnabled(
|
||||
value,
|
||||
);
|
||||
},
|
||||
),
|
||||
secondary: const Icon(Icons.system_update),
|
||||
title: const Text('Update notifications'),
|
||||
subtitle: const Text(
|
||||
|
||||
Reference in New Issue
Block a user