aboutsummaryrefslogtreecommitdiff
path: root/sx-question.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-04 14:07:40 -0500
committerSean Allred <code@seanallred.com>2015-01-04 14:07:40 -0500
commit01df71244d3fe5412e2420127dcd2282d9fa39c7 (patch)
tree0fe936bfa609ea19c454cdcb4d1c2349d5c0c746 /sx-question.el
parent59327f6f9c6ba419543c47670a62af0aa41271ca (diff)
parent89834aa61adf1fff29379c82ab96629f0b2960d0 (diff)
Merge branch 'master' into filter-macro
Conflicts: sx-filter.el
Diffstat (limited to 'sx-question.el')
-rw-r--r--sx-question.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/sx-question.el b/sx-question.el
index 85d3cc5..0e830a6 100644
--- a/sx-question.el
+++ b/sx-question.el
@@ -26,7 +26,7 @@
(require 'sx-filter)
(require 'sx-method)
-(defun sx-question-get-questions (site &optional page keywords)
+(defun sx-question-get-questions (site &optional page keywords submethod)
"Get SITE questions. Return page PAGE (the first if nil).
Return a list of question. Each question is an alist of
properties returned by the API with an added (site SITE)
@@ -39,6 +39,7 @@ KEYWORDS are added to the method call along with PAGE.
:keywords `((page . ,page) ,@keywords)
:site site
:auth t
+ :submethod submethod
:filter sx-browse-filter))
(defun sx-question-get-question (site question-id)
@@ -118,7 +119,8 @@ See `sx-question--user-read-list'."
;; Question already present.
((setq cell (assoc .question_id site-cell))
;; Current version is newer than cached version.
- (when (> .last_activity_date (cdr cell))
+ (when (or (not (numberp (cdr cell)))
+ (> .last_activity_date (cdr cell)))
(setcdr cell .last_activity_date)))
;; Question wasn't present.
(t