Kept the app responsive while a backup copies the index (#1062)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-15 17:50:44 +02:00
1 parent 936043319c
commit 65857ca845
5 files changed
+64 -28

No files matched your search

@@ -188,9 +188,11 @@ public partial class DataBackupPanel : MSGComponentBase
if (selectionResponse.UserCancelled)
return;
this.selectedArchivePath = selectionResponse.SelectedFilePath;
var archivePath = this.selectedArchivePath = selectionResponse.SelectedFilePath;
this.importResult = null;
this.preview = await ChatArchiveImporter.ReadPreviewAsync(this.selectedArchivePath, CancellationToken.None);
// A large backup lists many thousands of files, and reading a ZIP file is mostly synchronous:
this.preview = await Task.Run(() => ChatArchiveImporter.ReadPreviewAsync(archivePath, CancellationToken.None));
}
finally
{