parmendra kumar

parmendra kumar

  • NA
  • 113
  • 5k

Unable to Bind server side data if I have bind list locally.

Mar 20 2018 9:37 AM
I have developed a chat aaplication and after click on send button message thake 3-4 second for update so I have try to bind list from local database, But After that my server data doesn't update on list.
 
var todoItem = new Chat { UserMessage = _etMessage.Text, UserName = User.UserName, Key = rm.Key };
await App.Database.SaveItemAsyncChat(todoItem);
_lstChat.BindingContext = await App.Database.GetItemsAsyncc();
var chatOBJ = new Chat { UserMessage = _etMessage.Text, UserName = User.UserName };
_etMessage.Text = "";
await db.saveMessage(chatOBJ, rm.Key);
// db.subChat(rm.Key);
var firebase = new FirebaseClient("https://hardwarechatxamarin.firebaseio.com/");
_lstChat.BindingContext = firebase
.Child("ChatApp/" + rm.Key + "/Message")
.AsObservable();