Skip to content

Commit

Permalink
Close file sender when deleting the last picture
Browse files Browse the repository at this point in the history
Resolves #1669
  • Loading branch information
FrayxRulez committed Jun 7, 2020
1 parent 5406ca2 commit 05ccd11
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,15 @@ public SendFilesPopup(IEnumerable<StorageMedia> items, bool media, bool ttl, boo

private void OnCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
UpdateView();
UpdatePanel();
if (Items.Count > 0)
{
UpdateView();
UpdatePanel();
}
else
{
Hide();
}
}

private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
Expand Down

0 comments on commit 05ccd11

Please sign in to comment.