mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +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(
|
(state as ServerInstallationNotFinished).copyWith(
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
serverDetails: serverDetails,
|
serverDetails: serverDetails,
|
||||||
|
installationDialoguePopUp: null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null);
|
runDelayed(startServerIfDnsIsOkay, const Duration(seconds: 30), null);
|
||||||
|
@ -734,20 +735,24 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
|
||||||
actionButtonTitle: branching.choices[1].title,
|
actionButtonTitle: branching.choices[1].title,
|
||||||
actionButtonOnPressed: () async {
|
actionButtonOnPressed: () async {
|
||||||
final branchingResult = await branching.choices[1].callback!();
|
final branchingResult = await branching.choices[1].callback!();
|
||||||
emit(
|
if (!branchingResult.success) {
|
||||||
(state as ServerInstallationNotFinished).copyWith(
|
emit(
|
||||||
installationDialoguePopUp: branchingResult.data,
|
(state as ServerInstallationNotFinished).copyWith(
|
||||||
),
|
installationDialoguePopUp: branchingResult.data,
|
||||||
);
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancelButtonTitle: branching.choices[0].title,
|
cancelButtonTitle: branching.choices[0].title,
|
||||||
cancelButtonOnPressed: () async {
|
cancelButtonOnPressed: () async {
|
||||||
final branchingResult = await branching.choices[0].callback!();
|
final branchingResult = await branching.choices[0].callback!();
|
||||||
emit(
|
if (!branchingResult.success) {
|
||||||
(state as ServerInstallationNotFinished).copyWith(
|
emit(
|
||||||
installationDialoguePopUp: branchingResult.data,
|
(state as ServerInstallationNotFinished).copyWith(
|
||||||
),
|
installationDialoguePopUp: branchingResult.data,
|
||||||
);
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue