Skip to content

Commit 015115b

Browse files
authored
Merge pull request #352 from Esri/Caleb/Update-ManageBookmarksBookmarkRemove
[Update] Manage bookmarks bookmark removal
2 parents d3ac701 + 312147b commit 015115b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Shared/Samples/Manage bookmarks/ManageBookmarksView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,18 @@ private extension ManageBookmarksView {
143143
}
144144
.onDelete { offsets in
145145
// Delete the bookmarks at the given offsets on row deletion.
146+
let bookmarksToRemove = offsets.map { bookmarks[$0] }
147+
map.removeBookmarks(bookmarksToRemove)
146148
bookmarks.remove(atOffsets: offsets)
147-
map.removeAllBookmarks()
148-
map.addBookmarks(bookmarks)
149149
}
150150
.buttonStyle(.plain)
151151
}
152152
.navigationTitle("Bookmarks")
153153
.navigationBarTitleDisplayMode(.inline)
154154
.toolbar {
155155
ToolbarItem(placement: .topBarTrailing) {
156+
// Note: There is a bug in iOS 17 that prevents the `EditButton` from working
157+
// on the first tap when it is embedded in a `NavigationView` in a `popover`.
156158
EditButton()
157159
}
158160
}

0 commit comments

Comments
 (0)