Exemplo n.º 1
0
        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();
                    });
                }
            }
        }
Exemplo n.º 2
0
 protected override void OnElementChanged(VisualElementChangedEventArgs e)
 {
     base.OnElementChanged(e);
     page = (GroupChatPage)e.NewElement;
 }