cleanup
This commit is contained in:
@@ -7,6 +7,7 @@ var Collection = function Collection()
|
||||
this._items = [];
|
||||
this._blockchain = new Blockchain();
|
||||
this._askedForHistory = false;
|
||||
this._askedForHistoryTime = 0;
|
||||
this._debounced = null;
|
||||
|
||||
return this;
|
||||
@@ -294,9 +295,14 @@ Collection.prototype.askedForHistory = function(set)
|
||||
if( !_.isUndefined(set) )
|
||||
{
|
||||
this._askedForHistory = set;
|
||||
|
||||
if(set === true)
|
||||
{
|
||||
this._askedForHistoryTime = _.now();
|
||||
}
|
||||
}
|
||||
|
||||
return this._askedForHistory;
|
||||
return (this._askedForHistory || _.now() - this._askedForHistoryTime < 2*60*1000);
|
||||
}
|
||||
|
||||
module.exports = Collection;
|
||||
|
||||
Reference in New Issue
Block a user