Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

android telebot setting (#9035)

21pagesb8b3a089f36f
diff --git a/flutter/lib/mobile/pages/settings_page.dart b/flutter/lib/mobile/pages/settings_page.dart
index 98a2b9f50..ca1ca1afa 100644
--- a/flutter/lib/mobile/pages/settings_page.dart
+++ b/flutter/lib/mobile/pages/settings_page.dart
@@ -266,6 +266,25 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
}
},
),
+ if (enable2fa)
+ SettingsTile.switchTile(
+ title: Text(translate('Telegram bot')),
+ initialValue: bind.mainHasValidBotSync(),
+ onToggle: (v) async {
+ update() async {
+ setState(() {});
+ }
+
+ if (v == false) {
+ CommonConfirmDialog(
+ gFFI.dialogManager, translate('cancel-bot-confirm-tip'), () {
+ changeBot(callback: update);
+ });
+ } else {
+ changeBot(callback: update);
+ }
+ },
+ ),
if (enable2fa)
SettingsTile.switchTile(
title: Column(