Page MenuHomePhorge

D15056.1765037448.diff
No OneTemporary

Size
4 KB
Referenced Files
None
Subscribers
None

D15056.1765037448.diff

diff --git a/native/calendar/calendar-screen.react.js b/native/calendar/calendar-screen.react.js
--- a/native/calendar/calendar-screen.react.js
+++ b/native/calendar/calendar-screen.react.js
@@ -568,14 +568,14 @@
};
static getItemLayout = (
- data: ?$ReadOnlyArray<CalendarItemWithHeight>,
+ data: ?$ArrayLike<CalendarItemWithHeight>,
index: number,
): { length: number, offset: number, index: number } => {
if (!data) {
return { length: 0, offset: 0, index };
}
const offset = CalendarScreen.heightOfItems(
- data.filter((_, i) => i < index),
+ Array.from(data).filter((_, i) => i < index),
);
const item = data[index];
const length = item ? CalendarScreen.itemHeight(item) : 0;
diff --git a/native/chat/chat-list.react.js b/native/chat/chat-list.react.js
--- a/native/chat/chat-list.react.js
+++ b/native/chat/chat-list.react.js
@@ -250,13 +250,15 @@
};
static getItemLayout = (
- data: ?$ReadOnlyArray<ChatMessageItemWithHeight>,
+ data: ?$ArrayLike<ChatMessageItemWithHeight>,
index: number,
): { length: number, offset: number, index: number } => {
if (!data) {
return { length: 0, offset: 0, index };
}
- const offset = ChatList.heightOfItems(data.filter((_, i) => i < index));
+ const offset = ChatList.heightOfItems(
+ Array.from(data).filter((_, i) => i < index),
+ );
const item = data[index];
const length = item ? chatMessageItemHeight(item) : 0;
return { length, offset, index };
diff --git a/native/chat/chat-thread-list-utils.js b/native/chat/chat-thread-list-utils.js
--- a/native/chat/chat-thread-list-utils.js
+++ b/native/chat/chat-thread-list-utils.js
@@ -50,13 +50,15 @@
}
function getItemLayout(
- data: ?$ReadOnlyArray<Item>,
+ data: ?$ArrayLike<Item>,
index: number,
): { length: number, offset: number, index: number } {
if (!data) {
return { length: 0, offset: 0, index };
}
- const offset = heightOfItems(data.filter((_, i): boolean => i < index));
+ const offset = heightOfItems(
+ Array.from(data).filter((_, i): boolean => i < index),
+ );
const item = data[index];
const length = item ? itemHeight(item) : 0;
return { length, offset, index };
diff --git a/native/chat/thread-list-modal.react.js b/native/chat/thread-list-modal.react.js
--- a/native/chat/thread-list-modal.react.js
+++ b/native/chat/thread-list-modal.react.js
@@ -32,7 +32,7 @@
function keyExtractor(sidebarInfo: ChatItem) {
return sidebarInfo.threadInfo.id;
}
-function getItemLayout(data: ?$ReadOnlyArray<ChatItem>, index: number) {
+function getItemLayout(data: ?$ArrayLike<ChatItem>, index: number) {
return { length: 24, offset: 24 * index, index };
}
diff --git a/native/components/community-list.react.js b/native/components/community-list.react.js
--- a/native/components/community-list.react.js
+++ b/native/components/community-list.react.js
@@ -34,7 +34,7 @@
item.threadInfo.id;
const getItemLayout = (
- data: ?$ReadOnlyArray<ThreadInfoAndFarcasterChannelID>,
+ data: ?$ArrayLike<ThreadInfoAndFarcasterChannelID>,
index: number,
): { length: number, offset: number, index: number } => {
return { length: 24, offset: 24 * index, index };
diff --git a/native/components/thread-list.react.js b/native/components/thread-list.react.js
--- a/native/components/thread-list.react.js
+++ b/native/components/thread-list.react.js
@@ -116,7 +116,7 @@
};
static getItemLayout = (
- data: ?$ReadOnlyArray<ThreadInfo>,
+ data: ?$ArrayLike<ThreadInfo>,
index: number,
): { length: number, offset: number, index: number } => {
return { length: 24, offset: 24 * index, index };
diff --git a/native/components/user-list.react.js b/native/components/user-list.react.js
--- a/native/components/user-list.react.js
+++ b/native/components/user-list.react.js
@@ -51,14 +51,16 @@
};
static getItemLayout = (
- data: ?$ReadOnlyArray<UserListItem>,
+ data: ?$ArrayLike<UserListItem>,
index: number,
): { length: number, offset: number, index: number } => {
if (!data) {
return { length: 0, offset: 0, index };
}
const offset = _sum(
- data.filter((_, i) => i < index).map(getUserListItemHeight),
+ Array.from(data)
+ .filter((_, i) => i < index)
+ .map(getUserListItemHeight),
);
const item = data[index];
const length = item ? getUserListItemHeight(item) : 0;

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 4:10 PM (17 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5836629
Default Alt Text
D15056.1765037448.diff (4 KB)

Event Timeline