aboutsummaryrefslogtreecommitdiff
path: root/sx-question.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-15 01:52:27 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-15 01:52:27 +0000
commit6a2252c6e6aec21cb9c9336b706947343f9e4fa6 (patch)
tree413fbbfd9cbb604230b75ba853b220ce028759f7 /sx-question.el
parent05deb5d7d095e0e8708733f508a42db7985c1e43 (diff)
Highlighting accepted answers actually works now.
Diffstat (limited to 'sx-question.el')
-rw-r--r--sx-question.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/sx-question.el b/sx-question.el
index d15cc80..19251ab 100644
--- a/sx-question.el
+++ b/sx-question.el
@@ -34,6 +34,7 @@
question.comments
question.answers
question.last_editor
+ question.accepted_answer_id
user.display_name
comment.owner
comment.body_markdown
@@ -69,10 +70,11 @@
;; @TODO:
(cl-evenp (random)))
-(defun sx-question--accepted-answer (question)
+(defun sx-question--accepted-answer-id (question)
"Return accepted answer in QUESTION, or nil if none."
- ;; @TODO:
- (cl-evenp (random)))
+ (sx-assoc-let question
+ (and (integerp .accepted_answer_id)
+ .accepted_answer_id)))
(defun sx-question--mark-read (question)
"Mark QUESTION as being read, until it is updated again."