mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-12-09 21:45:38 -05:00
deadlock cleanup
This commit is contained in:
parent
23867a1784
commit
2141dbff21
40 changed files with 254 additions and 253 deletions
|
|
@ -61,6 +61,13 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
|
|||
);
|
||||
|
||||
Future<void> _onRemoveAccount() async {
|
||||
// dismiss the keyboard by unfocusing the textfield
|
||||
FocusScope.of(context).unfocus();
|
||||
await asyncSleep(const Duration(milliseconds: 250));
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
final confirmed = await StyledDialog.show<bool>(
|
||||
context: context,
|
||||
title: translate('edit_account_page.remove_account_confirm'),
|
||||
|
|
@ -87,10 +94,7 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
|
|||
]))
|
||||
]).paddingAll(24)
|
||||
]));
|
||||
if (confirmed != null && confirmed && mounted) {
|
||||
// dismiss the keyboard by unfocusing the textfield
|
||||
FocusScope.of(context).unfocus();
|
||||
|
||||
if (confirmed != null && confirmed) {
|
||||
try {
|
||||
setState(() {
|
||||
_isInAsyncCall = true;
|
||||
|
|
@ -125,6 +129,13 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
|
|||
}
|
||||
|
||||
Future<void> _onDestroyAccount() async {
|
||||
// dismiss the keyboard by unfocusing the textfield
|
||||
FocusScope.of(context).unfocus();
|
||||
await asyncSleep(const Duration(milliseconds: 250));
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
final confirmed = await StyledDialog.show<bool>(
|
||||
context: context,
|
||||
title: translate('edit_account_page.destroy_account_confirm'),
|
||||
|
|
@ -154,10 +165,7 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
|
|||
]))
|
||||
]).paddingAll(24)
|
||||
]));
|
||||
if (confirmed != null && confirmed && mounted) {
|
||||
// dismiss the keyboard by unfocusing the textfield
|
||||
FocusScope.of(context).unfocus();
|
||||
|
||||
if (confirmed != null && confirmed) {
|
||||
try {
|
||||
setState(() {
|
||||
_isInAsyncCall = true;
|
||||
|
|
|
|||
|
|
@ -282,9 +282,6 @@ class _EditProfileFormState extends State<EditProfileForm> {
|
|||
FormBuilderCheckbox(
|
||||
name: EditProfileForm.formFieldAutoAway,
|
||||
initialValue: _savedValue.autoAway,
|
||||
side: BorderSide(color: scale.primaryScale.border, width: 2),
|
||||
checkColor: scale.primaryScale.borderText,
|
||||
activeColor: scale.primaryScale.border,
|
||||
title: Text(translate('account.form_auto_away'),
|
||||
style: textTheme.labelMedium),
|
||||
onChanged: (v) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue