mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-11 18:47:47 +00:00
ab: unremember password in ab also unremember password in recent, and set alias also sync to recent
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -212,6 +212,14 @@ class AbModel {
|
||||
it.first.alias = alias;
|
||||
}
|
||||
|
||||
void unrememberPassword(String id) {
|
||||
final it = peers.where((element) => element.id == id);
|
||||
if (it.isEmpty) {
|
||||
return;
|
||||
}
|
||||
it.first.hash = '';
|
||||
}
|
||||
|
||||
Future<bool> pushAb(
|
||||
{bool toastIfFail = true,
|
||||
bool toastIfSucc = true,
|
||||
@@ -507,4 +515,17 @@ class AbModel {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
reSyncToast(Future<bool> future) {
|
||||
if (!shouldSyncAb()) return;
|
||||
Future.delayed(Duration.zero, () async {
|
||||
final succ = await future;
|
||||
if (succ) {
|
||||
await Future.delayed(Duration(seconds: 2)); // success msg
|
||||
BotToast.showText(
|
||||
contentColor: Colors.lightBlue,
|
||||
text: translate('synced_peer_readded_tip'));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user