android: the room list filtered by name, the rest on demand
Soulseek lists hundreds of rooms; the phone showed the first 80 and no way to the rest. Community → Rooms now has a filter by name and extends the list 200 at a time.
This commit is contained in:
1 parent
60303c8a95
commit
d95c3f48d1
5 files changed
+35
-2
No files matched your search
@@ -112,6 +112,7 @@ const PROBE = `(function () {
|
||||
plfilter: !!document.querySelector('.plfilter input'),
|
||||
plfirst: (document.querySelector('.pl-rows .trk .t') || {}).textContent || '',
|
||||
qfirst: (document.querySelector('.q-face .row .t') || {}).textContent || '',
|
||||
rooms: document.querySelectorAll('.screen button.row .art.hash').length,
|
||||
plthumbs: document.querySelectorAll('.pl-rows .thumb img').length,
|
||||
imp: document.querySelectorAll('.imp-rows .trk').length,
|
||||
impTags: [].map.call(document.querySelectorAll('.imp-rows .tag'), function (t) { return t.textContent.trim(); }).join('|'),
|
||||
@@ -202,6 +203,10 @@ const MOCK_STEPS = [
|
||||
{ do: `__click('.halfsheet .prompt-acts .btn-fill', 'Open')`, name: "user-lookup", wait: 700 },
|
||||
{ do: `document.querySelector('.scrim').click()`, wait: 500 },
|
||||
{ do: `__click('.segtabs button', 'Rooms')`, wait: 500 },
|
||||
/* the room list: filtered by name, the rest on demand */
|
||||
{ do: `(function () { var i = document.querySelector('.roomfilter input'); i.value = 'vin'; i.dispatchEvent(new Event('input', { bubbles: true })); })()`, name: "rooms-filtered", wait: 500 },
|
||||
{ do: `(function () { var i = document.querySelector('.roomfilter input'); i.value = ''; i.dispatchEvent(new Event('input', { bubbles: true })); })()`, wait: 400 },
|
||||
{ do: `__click('.screen .btn', 'more rooms')`, name: "rooms-more", wait: 500 },
|
||||
/* the fake network: a room with a few lines in it */
|
||||
{ do: `__click('.screen button.row', 'Lounge')`, name: "room", wait: 2400 },
|
||||
{ do: `history.back()`, wait: 700 },
|
||||
@@ -422,6 +427,8 @@ const MOCK_EXPECT = {
|
||||
complete the set, following — the desktop's page */
|
||||
"home-again": (i) => /^(Good |Still)/.test(i.title) && /^Coming/.test(i.feat) && i.news >= 1 && /New from your artists/.test(i.secs) && /From the back catalogue/.test(i.secs) && /Recommended for you/.test(i.secs) && /Following/.test(i.secs),
|
||||
room: (i) => i.screen.includes("tr-push") && i.msgs >= 2,
|
||||
"rooms-filtered": (i) => i.rooms === 1,
|
||||
"rooms-more": (i) => i.rooms >= 95,
|
||||
/* the artist with a picture shows it on the hero and its card; the
|
||||
namesake under Deezer's empty-hash placeholder shows the app's own */
|
||||
"cat-results": (i) => i.songs >= 4 && i.top.startsWith("Daft Punk") && i.heroImg && i.cardImgs === 1 && i.cardPhs === 1,
|
||||
|
||||
Reference in new issue
Block a user