protected override void OnElementChanged (VisualElementChangedEventArgs e) { base.OnElementChanged (e); page = (GroupChatPage)e.NewElement; }
private void OnMessageReceived(object sender, MessageEventArgs messageEventArgs) { var message = messageEventArgs.Message; if (message.NotificationType == NotificationTypes.GroupCreate || message.NotificationType == NotificationTypes.GroupUpdate) { if (message.AddedOccupantsIds.Any()) { groupManager.MessageReceived -= OnMessageReceived; Device.BeginInvokeOnMainThread(() => { var groupChantPage = new GroupChatPage(message.ChatDialogId); App.Navigation.InsertPageBefore(groupChantPage, (App.Current.MainPage as NavigationPage).CurrentPage); App.Navigation.PopAsync(); }); } } }