Skip to content

Commit

Permalink
Fix Carousel restarting on LoPrio after Hover
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Nov 13, 2023
1 parent 5b15ebe commit 38282ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,12 @@ private async void TryLoadEventPanelImage()

private void CarouselRestartScroll(object sender, PointerRoutedEventArgs e)
{
CarouselToken = new CancellationTokenSource();
StartCarouselAutoScroll(CarouselToken.Token);
// Don't restart carousel if game is running and LoPrio is on
if (!CurrentGameProperty.IsGameRunning || !GetAppConfigValue("LowerCollapsePrioOnGameLaunch").ToBool())
{
CarouselToken = new CancellationTokenSource();
StartCarouselAutoScroll(CarouselToken.Token);
}
}

private async void HideImageCarousel(bool hide)
Expand Down

0 comments on commit 38282ab

Please sign in to comment.