Skip to content

Commit

Permalink
Fixed one time photos bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
FrayxRulez committed Feb 3, 2024
1 parent 895145d commit a2d6dfc
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions Telegram/Controls/Messages/Content/PhotoContent.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,20 @@ private void UpdateFile(MessageViewModel message, File file)
Subtitle.Text = Strings.AttachGame;
Overlay.Opacity = 1;
}
else if (isSecret is false)
else if (isSecret)
{
if (message.SelfDestructType is MessageSelfDestructTypeTimer selfDestructTypeTimer)
{
Subtitle.Text = Icons.PlayFilled12 + "\u2004\u200A" + Locale.FormatTtl(selfDestructTypeTimer.SelfDestructTime, true);
}
else
{
Subtitle.Text = Icons.ArrowClockwiseFilled12 + "\u2004\u200A1";
}

Overlay.Opacity = 1;
}
else
{
Overlay.Opacity = 0;
}
Expand Down Expand Up @@ -233,18 +246,8 @@ private void UpdateFile(MessageViewModel message, File file)
Button.Progress = 1;

Button.Opacity = 1;
Overlay.Opacity = 1;

Texture.ImageSource = null;

if (message.SelfDestructType is MessageSelfDestructTypeTimer selfDestructTypeTimer)
{
Subtitle.Text = Icons.PlayFilled12 + "\u2004\u200A" + Locale.FormatTtl(selfDestructTypeTimer.SelfDestructTime, true);
}
else
{
Subtitle.Text = Icons.ArrowClockwiseFilled12 + "\u2004\u200A1";
}
}
else
{
Expand Down

0 comments on commit a2d6dfc

Please sign in to comment.