Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
修复稍后再看条目菜单显示异常的问题 (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy committed Mar 31, 2022
1 parent e03cf40 commit 5306ad1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/App/Controls/Common/VideoCard/VideoCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ private static void OnOrientationChanged(DependencyObject d, DependencyPropertyC
instance.CheckOrientation();
}

private void OnLoaded(object sender, RoutedEventArgs e) => CheckOrientation();
private void OnLoaded(object sender, RoutedEventArgs e)
{
CheckOrientation();
if (ContextFlyout != null)
{
_rootCard.ContextFlyout = null;
}
}

private void CheckOrientation()
{
Expand Down
1 change: 1 addition & 0 deletions src/App/Pages/Overlay/HistoryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<controls:VideoCard.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem
MinWidth="160"
Click="OnDeleteItemClickAsync"
DataContext="{x:Bind}"
Text="{loc:LocaleLocator Name=Delete}">
Expand Down
5 changes: 4 additions & 1 deletion src/App/Pages/Overlay/ViewLaterPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@
ViewModel="{x:Bind}">
<controls:VideoCard.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Click="OnRemoveItemClickAsync" Text="{loc:LocaleLocator Name=Remove}">
<MenuFlyoutItem
MinWidth="160"
Click="OnRemoveItemClickAsync"
Text="{loc:LocaleLocator Name=Remove}">
<MenuFlyoutItem.Icon>
<icons:RegularFluentIcon Foreground="{ThemeResource SystemFillColorCriticalBrush}" Symbol="Delete20" />
</MenuFlyoutItem.Icon>
Expand Down

0 comments on commit 5306ad1

Please sign in to comment.