| 113 | thumbsOnly: true, |
| 114 | }; |
| 115 | async function getTopicsFromSet(set) { |
| 116 | let start = 0; |
| 117 | const topicsData = []; |
| 118 | |
| 119 | do { |
| 120 | let tids = await db.getSortedSetRevRangeByScore(set, start, 20, Date.now(), '-inf'); |
| 121 | if (!tids.length) { |
| 122 | break; |
| 123 | } |
| 124 | |
| 125 | tids = await topics.filterNotIgnoredTids(tids, widget.uid); |
| 126 | let nextTopics = await topics.getTopics(tids, getTopicsOptions); |
| 127 | |
| 128 | nextTopics = await user.blocks.filter(widget.uid, nextTopics); |
| 129 | topicsData.push(...nextTopics); |
| 130 | start += 20; |
| 131 | } while (topicsData.length < 20); |
| 132 | return { topics: topicsData.slice(0, 20) }; |
| 133 | } |
| 134 | |
| 135 | let topicsData = { |
| 136 | topics: [], |