protected override void OnAppearing() { if (App.Current.Properties.ContainsKey("loggedUser")) { User currentUser = App.Current.Properties["loggedUser"] as User; _currentUser = currentUser; client.Connect(currentUser.Email); //client.ConnectionError += Client_ConnectionError; client.OnMessageReceived += Client_OnMessageReceived; FillChannels(); } base.OnAppearing(); }
public Chat(string username, string ıd) { InitializeComponent(); BindingContext = loginViewModel; Title = ıd; _username = username; _roomname = ıd; client.Connect(_username, _roomname); client.ConnectionError += Client_ConnectionError; client.OnMessageReceived += Client_OnMessageReceived; messagelist.BindingContext = model; this.BindingContext = model; this.BindingContext = _rooms; BindMessage(); }