android telebot setting (#9035)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
8f00067266
commit
b8b3a089f3
@ -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)
|
if (enable2fa)
|
||||||
SettingsTile.switchTile(
|
SettingsTile.switchTile(
|
||||||
title: Column(
|
title: Column(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user