Offline Support
This commit is contained in:
@@ -987,10 +987,20 @@ class _TicketDetailScreenState extends ConsumerState<TicketDetailScreen> {
|
||||
);
|
||||
} catch (e) {
|
||||
if (!screenContext.mounted) return;
|
||||
showErrorSnackBar(
|
||||
screenContext,
|
||||
'Failed to update ticket: $e',
|
||||
);
|
||||
if (isOfflineSaveError(e)) {
|
||||
if (dialogContext.mounted) {
|
||||
Navigator.of(dialogContext).pop();
|
||||
}
|
||||
showSuccessSnackBar(
|
||||
screenContext,
|
||||
'Ticket update saved offline — will sync when connected.',
|
||||
);
|
||||
} else {
|
||||
showErrorSnackBar(
|
||||
screenContext,
|
||||
'Failed to update ticket: $e',
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
if (dialogContext.mounted) {
|
||||
setDialogState(() => saving = false);
|
||||
|
||||
Reference in New Issue
Block a user