Skip to content

Commit b58ba32

Browse files
committed
Move UpdatePreviewAsync call to property setter
UpdatePreviewAsync is now called directly in the PreviewSelectedItem setter to ensure immediate updates. Added a debug log for easier troubleshooting.
1 parent e8a1368 commit b58ba32

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ public MainViewModel()
175175
QueryResults();
176176
}
177177
break;
178-
case nameof(PreviewSelectedItem):
179-
_ = UpdatePreviewAsync();
180-
break;
181178
}
182179
};
183180

@@ -1195,7 +1192,9 @@ public ResultViewModel PreviewSelectedItem
11951192
if (_previewSelectedItem != value)
11961193
{
11971194
_previewSelectedItem = value;
1195+
_ = UpdatePreviewAsync();
11981196
OnPropertyChanged();
1197+
System.Diagnostics.Debug.WriteLine("Update preview");
11991198
}
12001199
}
12011200
}

0 commit comments

Comments
 (0)