aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-04 17:50:35 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-04 18:12:16 -0200
commite8a2b48d09e22cf5dca446e70d1428ae4561fd42 (patch)
tree8cc779f5c94a05671a2db52baa37943179cc0fd0
parentbeafd94faf6ec8c1aede9cbca66c5af26bf35d51 (diff)
Display bounty
-rw-r--r--sx-filter.el1
-rw-r--r--sx-question-list.el13
2 files changed, 11 insertions, 3 deletions
diff --git a/sx-filter.el b/sx-filter.el
index d484f43..1cf010f 100644
--- a/sx-filter.el
+++ b/sx-filter.el
@@ -106,6 +106,7 @@ return the compiled filter."
(defvar sx-browse-filter
(sx-filter-from-nil
((question body_markdown
+ bounty_amount
comments
answers
last_editor
diff --git a/sx-question-list.el b/sx-question-list.el
index ee7d6b1..81e5ab0 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -104,6 +104,11 @@
""
:group 'sx-question-list-faces)
+(defface sx-question-list-bounty
+ '((t :inherit font-lock-warning-face))
+ ""
+ :group 'sx-question-list-faces)
+
;;; Backend variables
(defvar sx-question-list--print-function #'sx-question-list--print-info
@@ -150,9 +155,11 @@ Also see `sx-question-list-refresh'."
(propertize " " 'display "\n ")
;; Second line
(propertize favorite 'face 'sx-question-list-favorite)
- " "
- (propertize (concat (sx-time-since .last_activity_date)
- sx-question-list-ago-string)
+ (if (and (numberp .bounty_amount) (> .bounty_amount 0))
+ (propertize (format "%4d" .bounty_amount)
+ 'face 'sx-question-list-bounty)
+ " ")
+ " "
'face 'sx-question-list-date)
" "
(propertize (mapconcat #'sx-question--tag-format .tags " ")