mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-02 14:16:58 +00:00
Show that we are doing something when upgrading/restarting server
This commit is contained in:
parent
532a3ab197
commit
e72df08453
|
@ -69,15 +69,18 @@ class JobsCubit extends Cubit<JobsState> {
|
|||
}
|
||||
|
||||
Future<void> rebootServer() async {
|
||||
emit(JobsStateLoading());
|
||||
final isSuccessful = await api.reboot();
|
||||
if (isSuccessful) {
|
||||
getIt<NavigationService>().showSnackBar('jobs.rebootSuccess'.tr());
|
||||
} else {
|
||||
getIt<NavigationService>().showSnackBar('jobs.rebootFailed'.tr());
|
||||
}
|
||||
emit(JobsStateEmpty());
|
||||
}
|
||||
|
||||
Future<void> upgradeServer() async {
|
||||
emit(JobsStateLoading());
|
||||
final isPullSuccessful = await api.pullConfigurationUpdate();
|
||||
final isSuccessful = await api.upgrade();
|
||||
if (isSuccessful) {
|
||||
|
@ -89,6 +92,7 @@ class JobsCubit extends Cubit<JobsState> {
|
|||
} else {
|
||||
getIt<NavigationService>().showSnackBar('jobs.upgradeFailed'.tr());
|
||||
}
|
||||
emit(JobsStateEmpty());
|
||||
}
|
||||
|
||||
Future<void> applyAll() async {
|
||||
|
|
Loading…
Reference in a new issue