Beispiel #1
0
		/// <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;
		}
Beispiel #2
0
        /// <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);
        }