fix forget password toast error when personal ab doesn't contain this id (#7589)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
edefa5f786
commit
41d99d5108
@ -750,8 +750,10 @@ abstract class BasePeerCard extends StatelessWidget {
|
|||||||
if (succ) {
|
if (succ) {
|
||||||
showToast(translate('Successful'));
|
showToast(translate('Successful'));
|
||||||
} else {
|
} else {
|
||||||
BotToast.showText(
|
if (tab.index == PeerTabIndex.ab.index) {
|
||||||
contentColor: Colors.red, text: translate("Failed"));
|
BotToast.showText(
|
||||||
|
contentColor: Colors.red, text: translate("Failed"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
padding: menuPadding,
|
padding: menuPadding,
|
||||||
|
@ -1490,7 +1490,7 @@ class Ab extends BaseAb {
|
|||||||
@override
|
@override
|
||||||
Future<bool> changePersonalHashPassword(String id, String hash) async {
|
Future<bool> changePersonalHashPassword(String id, String hash) async {
|
||||||
if (!personal) return false;
|
if (!personal) return false;
|
||||||
if (!peers.any((e) => e.id == id)) return false;
|
if (!peers.any((e) => e.id == id)) return true;
|
||||||
return await _setPassword({"id": id, "hash": hash});
|
return await _setPassword({"id": id, "hash": hash});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user