Skip to content

Commit

Permalink
fix the issue that cannot open game banner's link #876
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Jul 2, 2024
1 parent cc33793 commit 16aeccd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Starward/Controls/GameBannerAndPost.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Starward.Core.HoYoPlay;
using Starward.Core.Launcher;
using Starward.Messages;
using Starward.Models;
using Starward.Pages;
Expand Down Expand Up @@ -162,10 +161,10 @@ private async void Image_Banner_Tapped(object sender, TappedRoutedEventArgs e)
{
try
{
if (sender is FrameworkElement fe && fe.DataContext is LauncherBanner banner)
if (sender is FrameworkElement fe && fe.DataContext is GameBanner banner)
{
await Launcher.LaunchUriAsync(new Uri(banner.Url));
_logger.LogInformation("Open banner {title}: {url}", banner.Name, banner.Url);
await Launcher.LaunchUriAsync(new Uri(banner.Image.Link));
_logger.LogInformation("Open banner: {url}", banner.Image.Link);
}
}
catch { }
Expand Down

0 comments on commit 16aeccd

Please sign in to comment.