forked from shadowfacts/Tusker
Prevent all pinned timelines from being removed
This commit is contained in:
parent
b1374b12a3
commit
ed2519848c
|
@ -49,9 +49,9 @@ struct PinnedTimelinesView: View {
|
||||||
.onMove { indices, newOffset in
|
.onMove { indices, newOffset in
|
||||||
pinnedTimelines.move(fromOffsets: indices, toOffset: newOffset)
|
pinnedTimelines.move(fromOffsets: indices, toOffset: newOffset)
|
||||||
}
|
}
|
||||||
.onDelete { indices in
|
.onDelete(perform: pinnedTimelines.count == 1 ? nil : { indices in
|
||||||
pinnedTimelines.remove(atOffsets: indices)
|
pinnedTimelines.remove(atOffsets: indices)
|
||||||
}
|
})
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
ForEach([Timeline.home, .public(local: true), .public(local: false)], id: \.id) { timeline in
|
ForEach([Timeline.home, .public(local: true), .public(local: false)], id: \.id) { timeline in
|
||||||
|
|
Loading…
Reference in New Issue