catalog: add required start() activating native Scroll navigation via Navigator

This commit is contained in:
Hermes committed 2026-08-08 22:31:34 +02:00
1 parent 3504c006d3
commit c6713090c1
1 file changed
+22
+22
View File
@@ -135,6 +135,28 @@
return html;
};
// Required by ActivitySlide contract. Activates navigation the same way the
// native catalog (Main) does: Scroll owns focus/scroll, Controller just drives
// Navigator. Scroll auto-scrolls the focused card into view.
this.start = function () {
var started = false;
Lampa.Controller.add('content', {
toggle: function () {
var first = $('.mymovies .card.selector')[0];
if (first && !started) {
started = true;
Lampa.Controller.collectionFocus(first, $('.mymovies'));
}
},
left: function () { if (Navigator.canmove('left')) Navigator.move('left'); else Lampa.Controller.toggle('menu'); },
right: function () { Navigator.move('right'); },
up: function () { Navigator.move('up'); },
down: function () { Navigator.move('down'); },
back: function () { Lampa.Activity.backward(); }
});
Lampa.Controller.toggle('content');
};
// Build each card and append through the native Scroll (handles focus + scroll).
function renderMovies(movies) {
movies.forEach(function (m) {