From 2412a46c82acc9d2e05877cf533e2d20b31b6085 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Mon, 6 Jan 2025 16:01:17 -0500 Subject: [PATCH] [iOS] Give new menu items unique visible/hidden ids in edit mode This change ensures that the cells aren't reused incorrectly when shifting between sections which ends up now showing the re-order drag bars correctly --- ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift b/ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift index 6eb59b175ad6..bb66d9fecc2e 100644 --- a/ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift +++ b/ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift @@ -37,6 +37,7 @@ struct CustomizeMenuView: View { .foregroundStyle(Color(braveSystemName: .iconDefault)) } } + .id("Visible-\(id.id)") } .onMove { indexSet, offset in guard let index = indexSet.first, let action = model.visibleActions[safe: index] else { @@ -77,6 +78,7 @@ struct CustomizeMenuView: View { .foregroundStyle(Color(braveSystemName: .iconDefault)) } } + .id("Hidden-\(id.id)") } .listRowBackground(Color(.secondaryBraveGroupedBackground)) } header: {