Rewrite the restricted iterators and reorder the forward references. [skip build]
Checks / checks (push) Successful in 2m11s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-01 21:05:47 +11:00
parent 5477242661
commit 664b7eb739
25 changed files with 472 additions and 437 deletions
+3 -1
View File
@@ -147,7 +147,9 @@ export const useRoomMediaEvents = (room: Room) => {
setHasMore(false);
}
for (const raw of response.chunk ?? []) {
const chunk = response.chunk ?? [];
for (let i = 0; i < chunk.length; i += 1) {
const raw = chunk[i];
const mEvent = await decryptEvent(raw);
const item = toMediaItem(mEvent);
if (item && !cache.seenIds.has(item.eventId)) {
+3 -1
View File
@@ -41,7 +41,9 @@ const MAX_AUTO_PAGE_COUNT = 50;
export function buildParentByRoomId(rooms: Iterable<IHierarchyRoom>): Map<string, string> {
const parentByRoomId = new Map<string, string>();
for (const room of rooms) {
const roomList = Array.from(rooms);
for (let i = 0; i < roomList.length; i += 1) {
const room = roomList[i];
if (room?.room_id && Array.isArray(room.children_state)) {
room.children_state.forEach((childState) => {
if (childState?.type !== StateEvent.SpaceChild) return;
+5 -2
View File
@@ -109,9 +109,12 @@ export function useOtherUserCollectibles(userId: string): CollectibleProfileFiel
['avatar_decoration', data.avatar_decoration],
] as const;
for (const [kind, collectible] of entries) {
for (let i = 0; i < entries.length; i += 1) {
const [kind, collectible] = entries[i];
if (collectible) {
for (const [role, mxc] of Object.entries(collectible.assets)) {
const assetEntries = Object.entries(collectible.assets);
for (let j = 0; j < assetEntries.length; j += 1) {
const [role, mxc] = assetEntries[j];
const blobUrl = await getProfileAssetUrl(mx, mxc, useAuthentication);
if (blobUrl) urls[`${kind}:${role}`] = blobUrl;
}