public List <string> GetFilteredPosts(DateTime i_DateStartTime, DateTime i_DateEndTime, IPostSorter i_Strategy, string i_FilterBySTR) { if (m_PostsFinder == null) { m_PostsFinder = new PostFinder(m_NewLoggedInUser.User); setRequierements(i_DateStartTime, i_DateEndTime, i_Strategy, i_FilterBySTR); } bool isOldPostsCache = checkIfItsOldCachePosts(i_DateEndTime); bool wasUserRequirementsChanged = checkIfRequirementsHaveChanged(i_DateStartTime, i_DateEndTime, i_Strategy, i_FilterBySTR); if (isOldPostsCache || wasUserRequirementsChanged) { setRequierements(i_DateStartTime, i_DateEndTime, i_Strategy, i_FilterBySTR); m_UserFilteredPost = m_PostsFinder.GetFilteredPosts(i_DateStartTime, i_DateEndTime, i_Strategy, i_FilterBySTR); } return(m_UserFilteredPost); }
public void UserStateChanged(User I_NewUser) { m_NewLoggedInUser.User = I_NewUser; m_PostsFinder = null; }