Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit 110fa90

Browse files
committed
feat(async album cover update)
1 parent 4d26a43 commit 110fa90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

View/MainWindow.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ private void UpdatePauseButtonImage(bool pause)
395395
PauseButton.Content = pause ? _playButtonImage : _pauseButtonImage;
396396
}
397397

398-
public void UpdateAlbumCover()
398+
public async void UpdateAlbumCover()
399399
{
400400
if (!Dispatcher.UIThread.CheckAccess())
401401
{
@@ -414,7 +414,7 @@ public void UpdateAlbumCover()
414414
var pathToAutoCover = _settingsManager.Settings?.Avalonix.AutoAlbumCoverPath;
415415
if (pathToAutoCover == null) return;
416416
using var stream =
417-
new MemoryStream(File.ReadAllBytes(_settingsManager.Settings!.Avalonix.AutoAlbumCoverPath!));
417+
new MemoryStream(await File.ReadAllBytesAsync(_settingsManager.Settings!.Avalonix.AutoAlbumCoverPath!));
418418
_currentAlbumCoverBitmap = new Bitmap(stream);
419419
AlbumCover.Source = _currentAlbumCoverBitmap;
420420
return;

0 commit comments

Comments
 (0)