Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

purge deferred checkins; onupdate wrapper

  • Loading branch information...
commit c75fdfa24637c52f17e7c519a8c4665c6bb0fe72 1 parent 0119fa1
straup authored
Showing with 16 additions and 5 deletions.
  1. +16 −5 www/javascript/privatesquare.deferred.js
View
21 www/javascript/privatesquare.deferred.js
@@ -87,14 +87,25 @@ function privatesquare_deferred_store(checkin, callback){
deferred.push(checkin);
store.set("deferred", deferred);
+ _privatesquare_deferred_onupdate();
+}
+
+function privatesquare_deferred_purge(callback){
+ var store = new Store("privatesquare");
+ var deferred = store.get("deferred");
+
+ if (deferred){
+ store.remove("deferred");
+ }
+
+ _privatesquare_deferred_onupdate();
+}
+
+function _privatesquare_deferred_onupdate(callback){
+
privatesquare_deferred_indicator();
if (callback){
callback(checkin);
}
}
-
-function privatesquare_deferred_purge(){
- var store = new Store("privatesquare");
- store.remove("deferred");
-}
Please sign in to comment.
Something went wrong with that request. Please try again.