private void LoginConnect() { if (!string.IsNullOrEmpty(userId) && !string.IsNullOrEmpty(nickName)) { ShowConnectProgress = true; var finalProfileUrl = !string.IsNullOrEmpty(profileUrl) ? profileUrl : ("https://dummyimage.com/40x40/a1a1a1/000000.png&text=" + NickName.ToLower()[0]); _sendbird.GetAPI().Connect(userId, nickName, finalProfileUrl); LocalCache.CurrentNickName = nickName; } }
public ChatListViewModel(IMvxNavigationService navigationService, ISendbirdConnectionService sendBird, IMvxMessenger messenger) : base() { _navigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService)); _sendBird = sendBird; _messenger = messenger; ChatList = new MvxObservableCollection <ChatListEntry>(); RegisterChatListUpdateNotificationListener(); RegisterIncomingMessageNotificationListener(); RegisterTypingStatusNotificationListener(); _sendBird.GetAPI().ListGroupChannels(); ChattingViewCommand = new MvxCommand <ChatListEntry>(LoadChattingView); }
public override void Prepare(ChannelInfo parameter) { _channel = parameter; _sendBird.GetAPI().ListGroupChannelMessages(_channel); }