/// <summary> /// Method for checking if a forum should be marked unread/new topics/posts. /// </summary> /// <param name="f">The forum in question.</param> /// <param name="ft">A ForumTracker, if any exists.</param> /// <param name="user">The current user, null if unauthenticated.</param> /// <returns>Returns true if posts/topics have been created since the user last viewed the forum, else false.</returns> public static Boolean UnRead(this Forum f, ForumTracker ft, User user) { // TODO: //if (user == null || // (ft != null && ((f.LatestTopic != null && (ft.LastViewed >= f.LatestTopic.Created)) || // (f.LatestPost != null && (ft.LastViewed >= f.LatestPost.Created)))) // ) { // return false; //} return true; }
/// <summary> /// Method for checking if a topic should be marked unread/new posts. /// </summary> /// <param name="t">The topic in question.</param> /// <param name="tt">A TopicTracker, if any exists.</param> /// <param name="user">The current user, null if unauthenticated.</param> /// <returns>Returns true if posts have been created since the user last viewed the topic, else false.</returns> public static Boolean UnRead(this Topic t, TopicTracker tt, User user) { // No user, or topic created later then last viewed (does that make sense?), or latest post created before last view? // TODO: //if (user == null || // (tt != null && // (tt.LastViewed >= t.Created || // (t.LatestPost != null && tt.LastViewed >= t.LatestPost.Created) // ) // )) { // return false; //} return true; }
public DummyUserProvider(User user) { this.user = user; }