aboutsummaryrefslogtreecommitdiff
path: root/sx-question.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-02 12:47:03 -0500
committerSean Allred <code@seanallred.com>2015-01-02 12:47:03 -0500
commitcf97f4c691ff5a2ee001e1f22e2eed0d7f6a9df8 (patch)
tree2f521c8f35a9a65f9da02eab4ff83257aa0a0260 /sx-question.el
parent542ddf73506c2c297106e4b3f4ec0a1d80a35ad8 (diff)
parent9a420bffcc426b4826f14ad1f62b5430750821df (diff)
Merge branch 'master' into goto-map
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 a890d37..1df67cd 100644
--- a/sx-question.el
+++ b/sx-question.el
@@ -160,14 +160,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)))))