move Activity.active() guard into toggle(); always add controller in start()
This commit is contained in:
1 parent
0d24e24168
commit
a4103f394a
1 file changed
+1
-1
@@ -81,13 +81,13 @@
|
||||
|
||||
// Wire up keyboard/remote navigation (pattern from Shikimori plugin).
|
||||
this.start = function () {
|
||||
if (Lampa.Activity.active().activity !== this.activity) return;
|
||||
if (!grid) return;
|
||||
var cards = grid.find('.card.selector');
|
||||
if (!cards.length) return;
|
||||
|
||||
Lampa.Controller.add('content', {
|
||||
toggle: function () {
|
||||
if (Lampa.Activity.active().activity !== comp.activity) return;
|
||||
Lampa.Controller.collectionSet(grid);
|
||||
Lampa.Controller.collectionFocus(cards[0], grid);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user