mobile: fix shortcuts not updating

This commit is contained in:
Ammar Ahmed
2026-01-16 11:10:45 +05:00
parent 09cba1a1df
commit 5633d4504f
2 changed files with 3 additions and 12 deletions

View File

@@ -131,7 +131,7 @@ function ReorderableList<T extends { id: string }>({
]
);
function getOrderedItems() {
const getOrderedItems = React.useCallback(() => {
if (!customizableSidebarFeature?.isAllowed) return data;
const items: T[] = [];
itemOrderState.forEach((id) => {
@@ -142,7 +142,7 @@ function ReorderableList<T extends { id: string }>({
items.push(...data.filter((i) => !itemOrderState.includes(i.id)));
return items;
}
}, [data, customizableSidebarFeature?.isAllowed]);
return (
<View style={styles.container}>

View File

@@ -37,7 +37,7 @@ import { Pressable } from "../ui/pressable";
import Paragraph from "../ui/typography/paragraph";
import { useSideBarDraggingStore } from "./dragging-store";
function _MenuItem({
export function MenuItem({
item,
index,
testID,
@@ -179,12 +179,3 @@ function _MenuItem({
</Pressable>
);
}
export const MenuItem = React.memo(_MenuItem, (prev, next) => {
if (
prev.item.id !== next.item.id &&
prev.item.data?.dateModified !== next.item.data?.dateModified
)
return false;
return true;
});