Skip to content

Commit

Permalink
[iOS] Give new menu items unique visible/hidden ids in edit mode
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kylehickinson committed Jan 6, 2025
1 parent b375744 commit 2412a46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/brave-ios/Sources/BrowserMenu/CustomizeMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -77,6 +78,7 @@ struct CustomizeMenuView: View {
.foregroundStyle(Color(braveSystemName: .iconDefault))
}
}
.id("Hidden-\(id.id)")
}
.listRowBackground(Color(.secondaryBraveGroupedBackground))
} header: {
Expand Down

0 comments on commit 2412a46

Please sign in to comment.