diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-14 22:36:24 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-14 22:36:24 -0200 |
commit | 344db027640cde39888c5fe4e4e4228b1308f95d (patch) | |
tree | 8c374df3a9c3a2346b4a55aa14c74d84d2679a24 | |
parent | 7bbd9ff872e23e111951101d66e355379853507a (diff) |
Reorder sx-display
-rw-r--r-- | sx-interaction.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sx-interaction.el b/sx-interaction.el index 21dde10..f122f13 100644 --- a/sx-interaction.el +++ b/sx-interaction.el @@ -163,14 +163,20 @@ likes." (interactive (list (sx--data-here))) (sx-assoc-let data (cond - (.notification_type - (sx-message "Viewing notifications is not yet implemented")) - (.item_type (sx-open-link .link)) + ;; If we have a `title', then we have the question object itself, + ;; and there's no need to fetch anything. + (.title + (sx-display-question data 'focus)) (.answer_id (sx-display-question - (sx-question-get-from-answer .site_par .id) 'focus)) - (.title - (sx-display-question data 'focus))))) + (sx-question-get-from-answer .site_par .id) + 'focus)) + (.question_id + (sx-display-question + (sx-question-get-question .site_par .id) 'focus)) + (.notification_type + (sx-message "Viewing notifications is not yet implemented")) + (.item_type (sx-open-link .link))))) (defun sx-display-question (&optional data focus window) "Display question given by DATA, on WINDOW. |