mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-21 18:05:28 +10:00
feat: Add dialog messages for companion connection and disconnection
- Introduced new dialog messages for connecting to a companion and handling disconnection across multiple languages. - Updated localization files for French, Hungarian, Italian, Japanese, Korean, Bulgarian, German, English, Spanish, Dutch, Polish, Portuguese, Russian, Slovak, Slovenian, Swedish, Ukrainian, and Chinese. - Modified the contacts and map screens to utilize the new dialog messages. - Enhanced the disconnect confirmation dialog to show a message upon successful disconnection. - Updated app bar to conditionally display radio stats based on companion connection status.
This commit is contained in:
@@ -31,6 +31,21 @@ Future<bool> showDisconnectDialog(
|
||||
if (confirmed == true) {
|
||||
appLogger.info('Disconnect confirmed from popup', tag: 'Connection');
|
||||
await connector.disconnect();
|
||||
if (context.mounted) {
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(context.l10n.dialog_disconnectedTitle),
|
||||
content: Text(context.l10n.dialog_disconnectedMessage),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(context.l10n.common_ok),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user