Skip to content

Commit

Permalink
Fix BG transition animation gets ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-nyan committed Nov 24, 2024
1 parent 4dcd012 commit bf9bda3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal enum MediaType
{
try
{
await action;
await action.ConfigureAwait(false);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ await ImageLoaderHelper.LoadImage(filePath, false,
BitmapImage bitmapImage =
await ImageLoaderHelper.Stream2BitmapImage(imageStream.AsRandomAccessStream());

await Task.WhenAll(
ColorPaletteUtility.ApplyAccentColor(ParentUI,
imageStream.AsRandomAccessStream(),
filePath,
isImageLoadForFirstTime, false),
ApplyAndSwitchImage(AnimationDuration, bitmapImage)
);
await Task.WhenAll([
ApplyAndSwitchImage(AnimationDuration, bitmapImage),
ColorPaletteUtility.ApplyAccentColor(ParentUI,
imageStream.AsRandomAccessStream(),
filePath,
isImageLoadForFirstTime, false)
]);

}
finally
Expand Down Expand Up @@ -118,7 +118,7 @@ await Task.WhenAll(
ImageBackLast.StartAnimation(timeSpan,
CurrentCompositor
.CreateScalarKeyFrameAnimation("Opacity",
0, 1, timeSpan * 0.8))
0, 1, timeSpan * 0.5))
);
}

Expand Down
1 change: 1 addition & 0 deletions CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ internal async void ChangeBackgroundImageAsRegionAsync(bool ShowLoadingMsg = fal
try
{
await DownloadBackgroundImage(default);
return; // Return after successfully loading
}
catch (Exception ex)
{
Expand Down

0 comments on commit bf9bda3

Please sign in to comment.