mirror of
https://github.com/Stone-Red-Code/Decho.git
synced 2026-09-04 08:56:14 +02:00
Show lock icon for protected channels
This commit is contained in:
@@ -30,6 +30,8 @@ public sealed class ChannelViewModel(ChannelModel model) : ViewModelBase
|
||||
|
||||
public bool IsProtected => Model.IsProtected;
|
||||
|
||||
public bool IsNotProtected => !Model.IsProtected;
|
||||
|
||||
public bool IsLocked
|
||||
{
|
||||
get => field;
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ChannelViewModel">
|
||||
<Grid ColumnDefinitions="Auto, *, Auto" Margin="2 0">
|
||||
<i:Icon Grid.Column="0" Value="fa-hashtag" FontWeight="Bold" Margin="0 0 4 1" VerticalAlignment="Center" />
|
||||
<Grid Grid.Column="0" Margin="0 0 4 0">
|
||||
<i:Icon Value="fa-hashtag" FontWeight="Bold" VerticalAlignment="Center" IsVisible="{Binding IsNotProtected}" />
|
||||
<i:Icon Value="fa-lock" FontWeight="Bold" VerticalAlignment="Center" IsVisible="{Binding IsProtected}" />
|
||||
</Grid>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
|
||||
<Border Grid.Column="2"
|
||||
IsVisible="{Binding HasUnread}"
|
||||
|
||||
Reference in New Issue
Block a user