public void Handle(UpdateServiceNotification update) { var caption = update.Content.GetCaption(); if (caption == null) { return; } var text = caption.Text; if (string.IsNullOrEmpty(text)) { return; } BeginOnUIThread(async() => { if (update.Type.StartsWith("AUTH_KEY_DROP_")) { var confirm = await MessagePopup.ShowAsync(text, Strings.Resources.AppName, Strings.Resources.LogOut, Strings.Resources.Cancel); if (confirm == ContentDialogResult.Primary) { _protoService.Send(new Destroy()); } } else { await MessagePopup.ShowAsync(text, Strings.Resources.AppName, Strings.Resources.OK); } }); }
public void Handle(UpdateServiceNotification update) { var caption = update.Content.GetCaption(); if (caption == null) { return; } var text = caption.Text; if (string.IsNullOrEmpty(text)) { return; } WindowWrapper.Default().Dispatcher.Dispatch(async() => { await TLMessageDialog.ShowAsync(text, Strings.Resources.AppName, Strings.Resources.OK); }); }