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

修复窄视图下关注直播间无法点击的问题 #886

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/App/Controls/Live/FollowLiveItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
IsShowPlayCount="False"
IsShowReplayCount="False"
IsShowViewerCount="True"
Orientation="Horizontal"
ItemClick="OnItemClick"
Orientation="Horizontal"
ViewModel="{x:Bind ViewModel, Mode=OneWay}" />
</Grid>
<Grid x:Name="VerticalContainer" Visibility="Collapsed">
<local:CardPanel Width="120" Click="OnCardClickAsync">
<local:CardPanel Width="120" Click="OnCardClick">
<Grid Padding="12" RowSpacing="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand All @@ -38,6 +38,7 @@
<local:UserAvatar
Width="52"
Height="52"
HorizontalAlignment="Center"
Avatar="{x:Bind ViewModel.Publisher.Avatar, Mode=OneWay}"
DecodeSize="40"
UserName="{x:Bind ViewModel.Publisher.Name, Mode=OneWay}" />
Expand Down
12 changes: 4 additions & 8 deletions src/App/Controls/Live/FollowLiveItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ private static void OnOrientationChanged(DependencyObject d, DependencyPropertyC
}

private void OnLoaded(object sender, RoutedEventArgs e)
{
CheckOrientation();
}
=> CheckOrientation();

private void CheckOrientation()
{
Expand All @@ -87,15 +85,13 @@ private void CheckOrientation()
}
}

private async void OnCardClickAsync(object sender, RoutedEventArgs e)
private void OnCardClick(object sender, RoutedEventArgs e)
{
ItemClick?.Invoke(this, EventArgs.Empty);
await PlayerViewModel.Instance.LoadAsync(ViewModel);
AppViewModel.Instance.OpenPlayer(ViewModel);
}

private void OnItemClick(object sender, VideoViewModel e)
{
ItemClick?.Invoke(this, EventArgs.Empty);
}
=> ItemClick?.Invoke(this, EventArgs.Empty);
}
}
14 changes: 1 addition & 13 deletions src/App/Controls/Live/FollowLiveView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@
FontSize="16"
Text="{loc:LocaleLocator Name=FollowLiveRoom}"
TextTrimming="CharacterEllipsis" />

<!--<Button
x:Name="SeeAllButton"
Grid.Column="1"
VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Spacing="4">
<local:IconTextBlock
Spacing="8"
Symbol="List16"
Text="{loc:LocaleLocator Name=SeeAll}" />
</StackPanel>
</Button>-->
</Grid>


Expand All @@ -88,8 +76,8 @@
<DataTemplate x:DataType="uwp:VideoViewModel">
<local:FollowLiveItem
DataContext="{x:Bind}"
Orientation="Horizontal"
ItemClick="OnItemClick"
Orientation="Horizontal"
ViewModel="{x:Bind}" />
</DataTemplate>
</muxc:ItemsRepeater.ItemTemplate>
Expand Down