Set current section to Home on Factory Reset cancel

This commit is contained in:
Elias Bonnici 2024-04-10 12:56:50 +02:00
parent 46b4afe030
commit e21fb7525c
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF

View File

@ -130,9 +130,16 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
? () {
_currentStep = -1;
_subscription?.cancel();
if (isAndroid) {
_resetSection();
}
}
: null,
_ => isAndroid && _application != null
? () {
_resetSection();
}
: null,
_ => null,
},
actions: [
if (_currentStep < _totalSteps)
@ -311,4 +318,8 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
),
);
}
void _resetSection() {
ref.read(currentSectionProvider.notifier).setCurrentSection(Section.home);
}
}