From 05ccd11759b5f27b24b45f9aedd7ac90d05196e8 Mon Sep 17 00:00:00 2001 From: Fela Ameghino Date: Sun, 7 Jun 2020 15:37:00 +0200 Subject: [PATCH] Close file sender when deleting the last picture Resolves #1669 --- Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs b/Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs index 24134fd070..5311e48026 100644 --- a/Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs +++ b/Unigram/Unigram/Views/Popups/SendFilesPopup.xaml.cs @@ -137,8 +137,15 @@ public SendFilesPopup(IEnumerable 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)