summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-01-20 23:51:37 +0100
committerJules Laplace <jules@okfoc.us>2016-01-20 23:51:37 +0100
commita1fbe0b115fd9f9b654dae79f266581c32ba00d2 (patch)
tree5d3fd9e4401bbfeff572ba4530630a731e252ad8 /StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
parent0a6a76b07644f38b2599a6bb0c462e82cdecbf8a (diff)
backup db, handle being offline better
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js')
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/HubView.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
index 687a3b95..9433b686 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
@@ -21,11 +21,16 @@ var HubView = ScrollableView.extend({
this.deferScrollToTop()
app.footer.hide()
document.body.className = "hub"
+ if (! this.populated) {
+ this.populate( BACKUP_DB.hub )
+ }
},
galleries: {},
+ populated: false,
populate: function(data){
// sort posts by date, reversed
+ this.populated = true
this.data = data.map(function(s){
return [ +moment(s.date), s ]
}).sort(function(a,b){