aboutsummaryrefslogtreecommitdiff
path: root/sx-question.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-01 22:25:00 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-01 22:25:00 -0200
commit6cc480fdab287133d6e09a9ad1eba260b891b604 (patch)
treef54e0334389bb0f017b75b3e91061994f2fc44e3 /sx-question.el
parent026a6903e2bcc3a63da3db203b44516d9da3d9e4 (diff)
parente05f937910bb4ca0e7ea1c9f1273fbafac523921 (diff)
Merge branch 'master' into inbox
Conflicts: sx-question.el sx.el
Diffstat (limited to 'sx-question.el')
-rw-r--r--sx-question.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/sx-question.el b/sx-question.el
index 3fcc438..85d3cc5 100644
--- a/sx-question.el
+++ b/sx-question.el
@@ -159,14 +159,13 @@ If no cache exists for it, initialize one with SITE."
(let ((site-cell (assoc .site_par sx-question--user-hidden-list)))
;; If question already hidden, do nothing.
(unless (memq .question_id site-cell)
- ;; First question from this site.
- (push (list .site_par .question_id) sx-question--user-hidden-list)
- ;; Question wasn't present.
- ;; Add it in, but make sure it's sorted (just in case we need
- ;; it later).
- (sx-sorted-insert-skip-first .question_id site-cell >)
- ;; This causes a small lag on `j' and `k' as the list gets large.
- ;; Should we do this on a timer?
+ (if (null site-cell)
+ ;; First question from this site.
+ (push (list .site_par .question_id) sx-question--user-hidden-list)
+ ;; Not first question and question wasn't present.
+ ;; Add it in, but make sure it's sorted (just in case we
+ ;; decide to rely on it later).
+ (sx-sorted-insert-skip-first .question_id site-cell >))
;; Save the results.
(sx-cache-set 'hidden-questions sx-question--user-hidden-list)))))