android telebot setting (#9035)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-08-12 22:20:35 +08:00 committed by GitHub
parent 8f00067266
commit b8b3a089f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(