mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
fix: Resolve timer conflicts on emultiple emits
This commit is contained in:
parent
c87b834550
commit
4adcca5746
|
@ -231,6 +231,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
|||
(state as ServerInstallationNotFinished).copyWith(
|
||||
isLoading: false,
|
||||
serverDetails: serverDetails,
|
||||
installationDialoguePopUp: null,
|
||||
),
|
||||
);
|
||||
runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null);
|
||||
|
@ -734,20 +735,24 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
|||
actionButtonTitle: branching.choices[1].title,
|
||||
actionButtonOnPressed: () async {
|
||||
final branchingResult = await branching.choices[1].callback!();
|
||||
emit(
|
||||
(state as ServerInstallationNotFinished).copyWith(
|
||||
installationDialoguePopUp: branchingResult.data,
|
||||
),
|
||||
);
|
||||
if (!branchingResult.success) {
|
||||
emit(
|
||||
(state as ServerInstallationNotFinished).copyWith(
|
||||
installationDialoguePopUp: branchingResult.data,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
cancelButtonTitle: branching.choices[0].title,
|
||||
cancelButtonOnPressed: () async {
|
||||
final branchingResult = await branching.choices[0].callback!();
|
||||
emit(
|
||||
(state as ServerInstallationNotFinished).copyWith(
|
||||
installationDialoguePopUp: branchingResult.data,
|
||||
),
|
||||
);
|
||||
if (!branchingResult.success) {
|
||||
emit(
|
||||
(state as ServerInstallationNotFinished).copyWith(
|
||||
installationDialoguePopUp: branchingResult.data,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue