From f1012cb50c65b4940049e91632c8e4f7be6ba15a Mon Sep 17 00:00:00 2001 From: Crauzer <18646077+Crauzer@users.noreply.github.com> Date: Wed, 29 Mar 2023 01:44:53 +0200 Subject: [PATCH] fix image preview delay bug --- Obsidian/Shared/WadExplorer.razor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Obsidian/Shared/WadExplorer.razor.cs b/Obsidian/Shared/WadExplorer.razor.cs index a8fad79..e82fa5d 100644 --- a/Obsidian/Shared/WadExplorer.razor.cs +++ b/Obsidian/Shared/WadExplorer.razor.cs @@ -425,6 +425,8 @@ private async Task PreviewImage(Image image) DotNetStreamReference jsStream = new(imageStream); await SetCurrentPreviewType(WadFilePreviewType.Image); + await Task.Delay(25); + await this.JsRuntime.InvokeVoidAsync( "setImage", WadPreviewUtils.IMAGE_PREVIEW_ID,