move Activity.active() guard into toggle(); always add controller in start()

This commit is contained in:
Hermes committed 2026-08-08 18:36:05 +02:00
1 parent 0d24e24168
commit a4103f394a
1 file changed
+1 -1
+1 -1
View File
@@ -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);
},