public override void RefreshData() { if (LastTimeLoadedData == -1 || ListPost.Count == 0 || DateTime.Now.Millisecond - LastTimeLoadedData > Settings.HOME_REFRESH_TIME) { ListPost.Clear(); LoadData(mCategoryId, 1); LastTimeLoadedData = DateTime.Now.Millisecond; } }
private void UpdatePosts() { ListTypePost.Clear(); ListPost.Clear(); if (_handler.SelectedDep != null) { foreach (var item in _handler.Model.PostTypes) { ListTypePost.Add(item); } foreach (var item in _handler.SelectedDep.Posts) { ListPost.Add(new PostViewModel(item)); } } }
public void ClearData() { ListPost.Clear(); LastTimeLoadedData = -1; }