Commit db2b9968 authored by Hans Eric Svensson's avatar Hans Eric Svensson
Browse files

Hopfully fix #1630 - mark texts as read in passive memberships

parent 6a204192
2007-04-26 Hans Eric Svensson <>
* lyskom-rest.el (lyskom-cache-all-memberships): New function
which loads memberships into cache, so that we can be really sure
that we haven't read a specific text.
(lyskom-find-best-text): Use new function to load
passive memberships into cache.
(lyskom-find-lowest-text): Use new function to load
passive memberships into cache.
* view-text.el (lyskom-follow-comments): Moved use of variable
kom-follow-comments-outside-membership to this function from
(lyskom-text-read-p): Moved use of the variable
kom-follow-comments-outside-membership to lyskom-follow-comments.
2007-02-04 Per Cederqvist <>
* edit-text.el (lyskom-edit-send): Document the hooks that this
......@@ -494,6 +494,12 @@ CONFS (list of conference numbers), otherwise a conference number."
(when (lyskom-get-membership conf t)
(lyskom-traverse-break conf))))
(defun lyskom-cache-all-memberships (confs)
"Loads the memberships of all of the conferences in CONFS (list of
conference numbers) into cache (mostly needed to load passive
memberships into cache)."
(lyskom-traverse conf confs (lyskom-get-membership conf t)))
(defun lyskom-member-one-priority-p (confs)
"Find out if the maximum priority of the conferences in CONFS (list
of conference numbers) is greater than or equal to the user's session
......@@ -561,12 +567,11 @@ which were made after CAME-FROM (as well as CAME-FROM)."
(visited (nth 1 params))
(loop-as-accept (nth 3 params))
(text-stat (blocking-do 'get-text-stat text-no))
; Sometimes is-read is nil even though it has no proof
; (when kom-follow-comments-outside-membership is nil).
(is-read (lyskom-text-read-p text-stat t))
(confs (lyskom-text-recipients text-stat))
(but-current (delq lyskom-current-conf confs))
(is-member (lyskom-member-of-at-least-one-p but-current)))
(is-member (lyskom-member-of-at-least-one-p but-current))
(tmp (if is-member (lyskom-cache-all-memberships confs)))
(is-read (lyskom-text-read-p text-stat t)))
(setcar params (cdr text-nos))
(cond ((not text-stat)) ; oops!
((memq text-no visited) ; loop detection
......@@ -638,9 +643,10 @@ VISITED to detect loops and save all of the candidates in CANDIDATES."
(while consider
(let* ((text-no (car consider))
(text-stat (blocking-do 'get-text-stat text-no))
(is-read (lyskom-text-read-p text-stat t))
(confs (lyskom-text-recipients text-stat))
(is-member (lyskom-member-of-at-least-one-p confs))
(tmp (if is-member (lyskom-cache-all-memberships confs)))
(is-read (lyskom-text-read-p text-stat t))
(more-text-nos (lyskom-text-stat-commented-texts text-stat))
(even-more-text-nos (lyskom-text-comments text-stat)))
(setq consider (cdr consider))
......@@ -547,7 +547,8 @@ lyskom-reading-list."
(let ((text-stat (blocking-do 'get-text-stat no)))
(if (and text-stat
(or review-tree
(not (lyskom-text-read-p text-stat t))))
(not (lyskom-text-read-p text-stat t))
(setq comments (cons no comments)))))
((memq no mx-attachments-in)
(lyskom-skip-attachments no mark-as-read))))
......@@ -572,7 +573,8 @@ lyskom-reading-list."
(let ((text-stat (blocking-do 'get-text-stat no)))
(if (or review-tree
(and text-stat
(not (lyskom-text-read-p text-stat))))
(or (not (lyskom-text-read-p text-stat))
(setq footnotes (cons no footnotes)))))
(if footnotes
......@@ -658,7 +660,7 @@ recipients to it that the user is a member in."
(membership->read-texts membership))))
(setq res nil)))))))
(if (eq res 'not-member)
(not kom-follow-comments-outside-membership)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment