//Refresh private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e) { try { MAdapter.UserList.Clear(); MAdapter.NotifyDataSetChanged(); SqLiteDatabase database = new SqLiteDatabase(); database.ClearLastChat(); database.Dispose(); StartApiService(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Refresh private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e) { try { ListUtils.ChatList.Clear(); MAdapter.UserList.Clear(); MAdapter.NotifyDataSetChanged(); SqLiteDatabase database = new SqLiteDatabase(); database.ClearLastChat(); database.ClearAll_Messages(); database.Dispose(); MainScrollEvent.IsLoading = false; StartApiService(); } catch (Exception exception) { Console.WriteLine(exception); } }