Beispiel #1
0
 public void DeleteAllCloudDrafts()
 {
     ShellViewModel.ShowCustomMessageBox(
         AppResources.DeleteAllCloudDraftsConfirmation, AppResources.AppName,
         AppResources.Delete, AppResources.Cancel,
         dismissed =>
     {
         MTProtoService.ClearAllDraftsAsync(
             result => Execute.BeginOnUIThread(() =>
         {
             var dialogs = CacheService.GetDialogs();
             foreach (var dialogBase in dialogs)
             {
                 var dialog = dialogBase as TLDialog71;
                 if (dialog != null)
                 {
                     dialog.Draft = null;
                     dialog.NotifyOfPropertyChange(() => dialog.Draft);
                 }
             }
         }));
     });
 }