From 344db027640cde39888c5fe4e4e4228b1308f95d Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 14 Jan 2015 22:36:24 -0200 Subject: Reorder sx-display --- sx-interaction.el | 18 ++++++++++++------ 1 file 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. -- cgit v1.2.3