fixed stale state after logout and replayed or lost share intents

This commit is contained in:
2026-09-24 21:43:21 +02:00
parent e4e2b1a4fb
commit 498d195138
32 changed files with 743 additions and 188 deletions
+9 -15
View File
@@ -53,15 +53,6 @@ class _FilesUploadDialogState extends State<FilesUploadDialog> {
}).toList();
}
void showHttpErrorCode(int httpErrorCode) {
InfoDialog.show(
context,
'Error code: $httpErrorCode',
title: 'Ein Fehler ist aufgetreten',
copyable: true,
);
}
void _resetProgress() {
_isUploading = false;
_overallProgressValue = 0.0;
@@ -221,14 +212,17 @@ class _FilesUploadDialogState extends State<FilesUploadDialog> {
return;
}
if (!mounted) return;
// Stay on the dialog: popping here reported the partial result as a
// success to onUploadFinished and closed the error dialog right away.
if (uploadTask.statusCode < 200 || uploadTask.statusCode > 299) {
setState(_resetProgress);
if (!mounted) return;
Navigator.of(context).pop();
showHttpErrorCode(uploadTask.statusCode);
} else {
uploadetFilePaths.add(fullRemotePath);
_showUploadError(
'Upload fehlgeschlagen für "$fileName" '
'(Fehlercode ${uploadTask.statusCode}).',
);
return;
}
uploadetFilePaths.add(fullRemotePath);
}
setState(_resetProgress);