mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 16:58:00 +00:00
Kept the app responsive while a backup copies the index (#1062)
This commit is contained in:
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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user