예제 #1
0
 public ChatPage(FormsChat.Model.User user, GroupChannel channel)
 {
     InitializeComponent();
     BindingContext = vm = new ChatViewModel();
     vm.Channel     = channel;
     vm.Title       = user.Nickname;
     vm.UserName    = Settings.UserId;
     vm.Load();
     instance = this;
 }
예제 #2
0
        public async void ConnectToChannel(FormsChat.Model.User user, List <string> users)
        {
            GroupChannel group = null;

            IsBusy = true;

            GroupChannel.CreateChannelWithUserIds(users, true, (GroupChannel groupChannel, SendBirdException e) => {
                if (e != null)
                {
                    // Error.
                    return;
                }
                group = groupChannel;
            });
            await Task.Delay(3000);

            IsBusy = false;
            await Navigation.PushAsync(new ChatPage(user, group));
        }