Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 0a7d894

Browse files
committed
some code cleanup
1 parent 96f3390 commit 0a7d894

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

js/router.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,10 @@ module.exports = Backbone.Router.extend({
7777
cached = this.viewCache[key];
7878
if (Date.now() - cached.cachedAt >= cached.view.cacheExpires) {
7979
delete this.viewCache[key].view.__cachedScrollPos;
80-
delete this.viewCache[key].view.__cachedAddressBarText;
8180
delete this.viewCache[key];
8281
}
8382
}
8483
}, this.cleanCacheInterval);
85-
86-
this.listenTo(window.obEventBus, 'addressBarTextSet', (text) => {
87-
if (this.view) {
88-
this.view.__cachedAddressBarText = text;
89-
}
90-
});
9184
},
9285

9386
// how often to clean out expired cached views

js/views/pageNavVw.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ module.exports = baseVw.extend({
319319
self._lastSetAddressBarText = text;
320320
self.addressInput.val(text);
321321
self.closeStatusBar();
322-
window.obEventBus.trigger('addressBarTextSet', text);
323322
});
324323
if (self.showDiscIntro){
325324
self.showDiscoverIntro();

js/views/pageVw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PageVw = BaseVw.extend({
88
});
99

1010
// this must be a "static" method and overridden as such (if you
11-
// are overriding), since the router doesn't have an instance
11+
// are overriding) since the router doesn't have an instance
1212
// when it's deciding whether to create a new one or use a cached one.
1313
PageVw.getCacheIndex = function(fragment) {
1414
if (!fragment) {

js/views/userPageVw.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,18 +1723,4 @@ UserPageVw = pageVw.extend({
17231723

17241724
});
17251725

1726-
UserPageVw.getCacheIndex = function(fragment) {
1727-
var splitFrag;
1728-
1729-
fragment = fragment || '';
1730-
splitFrag = fragment.split('/');
1731-
1732-
if (splitFrag.length > 1) {
1733-
return `userPage/${splitFrag[1]}`;
1734-
} else {
1735-
throw Error('The expectation is that the user page will be routed ' +
1736-
'with a minimum fragment of \'userPage\'/<guid>');
1737-
}
1738-
};
1739-
17401726
module.exports = UserPageVw;

0 commit comments

Comments
 (0)