Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 8055130

Browse files
committed
Added forward message feature
1 parent 3a75406 commit 8055130

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Views/Chats/Chat.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
mc:Ignorable="d"
99
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
1010

11-
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="10">
11+
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0, 10">
1212
<Grid.RowDefinitions>
1313
<RowDefinition />
1414
<RowDefinition />
1515
<RowDefinition />
1616
</Grid.RowDefinitions>
1717

18-
<Grid VerticalAlignment="Top" Row="0">
18+
<Grid VerticalAlignment="Top" HorizontalAlignment="Stretch" Row="0">
1919
<Border Background="Gray">
2020
<StackPanel x:Name="TopBar" Orientation="Horizontal">
2121
<Button x:Name="Back" Content="Back" Click="Back_OnClick" HorizontalAlignment="Left" />
@@ -28,7 +28,7 @@
2828
</Border>
2929
</Grid>
3030

31-
<Grid VerticalAlignment="Top" Row="1">
31+
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Row="1">
3232
<Border>
3333
<Border.Background>
3434
<ImageBrush x:Name="ThemeBackground" />

Views/Chats/ChatMessage.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ private void Reply_OnClick(object sender, RoutedEventArgs e)
196196

197197
private void Forward_OnClick(object sender, RoutedEventArgs e)
198198
{
199-
throw new NotImplementedException();
199+
_client.ExecuteAsync(new TdApi.ForwardMessages
200+
{
201+
ChatId = -4214922794,
202+
FromChatId = _chatId,
203+
MessageIds = new[] { _messageId },
204+
Options = new TdApi.MessageSendOptions()
205+
});
200206
}
201207

202208
private void Edit_OnClick(object sender, RoutedEventArgs e)

Views/ChatsView.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
x:Class="CherryMerryGram.Views.ChatsView"
44
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
55
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6-
xmlns:local="using:CherryMerryGram.Views"
76
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
87
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
98
mc:Ignorable="d"
@@ -14,7 +13,7 @@
1413
<ScrollView>
1514
<StackPanel x:Name="ChatsList" Width="350" />
1615
</ScrollView>
17-
<Grid x:Name="Chat" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
16+
<Grid x:Name="Chat" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" />
1817
</StackPanel>
1918
</Grid>
2019
</Page>

0 commit comments

Comments
 (0)