Skip to content
Open
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
7 changes: 6 additions & 1 deletion Unicord.Universal/Controls/EmotePicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ public void Load()
{
try
{
Source.Source = EmojiUtilities.GetEmoji(new ChannelViewModel(Channel.Id, true), searchBox.Text);
ChannelViewModel channelVm = null;
if (Channel != null)
{
channelVm = new ChannelViewModel(Channel.Id, true);
}
Source.Source = EmojiUtilities.GetEmoji(channelVm, searchBox.Text);
}
catch { }
}
Expand Down
7 changes: 7 additions & 0 deletions Unicord.Universal/Controls/Flyouts/ChannelContextFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@

<MenuFlyoutSeparator/>

<MenuFlyoutItem x:Name="ProfileItem"
x:Uid="/Flyouts/Profile"
Text="Profile"
Icon="OtherUser"
Visibility="{Binding Recipient, Converter={StaticResource HideOnNullConverter}}"
Click="ProfileItem_Click" />

<MenuFlyoutItem x:Uid="/Flyouts/MarkAsRead" Command="{Binding AcknowledgeCommand}">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="&#xE930;" FontFamily="{StaticResource SymbolThemeFontFamily}"/>
Expand Down
15 changes: 14 additions & 1 deletion Unicord.Universal/Controls/Flyouts/ChannelContextFlyout.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Windows.UI.Xaml.Controls;
using Unicord.Universal.Models.Channels;
using Unicord.Universal.Pages.Overlay;
using Unicord.Universal.Services;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Unicord.Universal.Controls.Flyouts
{
Expand All @@ -8,5 +12,14 @@ public ChannelContextFlyout()
{
InitializeComponent();
}

private async void ProfileItem_Click(object sender, RoutedEventArgs e)
{
if (sender is FrameworkElement element && element.DataContext is ChannelViewModel channel && channel.Recipient != null)
{
await OverlayService.GetForCurrentView()
.ShowOverlayAsync<UserInfoOverlayPage>(channel.Recipient);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

<MenuFlyoutSeparator/>

<MenuFlyoutItem x:Name="ProfileItem"
x:Uid="/Flyouts/Profile"
Text="Profile"
Icon="OtherUser"
Click="ProfileItem_Click" />
<MenuFlyoutItem x:Uid="/Flyouts/MarkAsRead" Command="{Binding AcknowledgeCommand}">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="&#xE930;" FontFamily="{StaticResource SymbolThemeFontFamily}"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Windows.UI.Xaml.Controls;
using Unicord.Universal.Models.Channels;
using Unicord.Universal.Pages.Overlay;
using Unicord.Universal.Services;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Unicord.Universal.Controls.Flyouts
{
Expand All @@ -8,5 +12,14 @@ public DirectMessageContextFlyout()
{
InitializeComponent();
}

private async void ProfileItem_Click(object sender, RoutedEventArgs e)
{
if (sender is FrameworkElement element && element.DataContext is ChannelViewModel channel && channel.Recipient != null)
{
await OverlayService.GetForCurrentView()
.ShowOverlayAsync<UserInfoOverlayPage>(channel.Recipient);
}
}
}
}
344 changes: 289 additions & 55 deletions Unicord.Universal/Controls/Flyouts/UserFlyout.xaml

Large diffs are not rendered by default.

Loading
Loading