mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-25 06:22:06 +01:00
Allow reordering of remote timelines (#1240)
The reordering of remote timelines is now available. See #1239 Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
This commit is contained in:
parent
0e3d174625
commit
ff9bfe9285
@ -266,6 +266,7 @@ struct SettingsTabs: View {
|
|||||||
_ = preferences.remoteLocalTimelines.remove(at: index)
|
_ = preferences.remoteLocalTimelines.remove(at: index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onMove(perform: moveTimelineItems)
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
Button {
|
Button {
|
||||||
routerPath.presentedSheet = .addRemoteLocalTimeline
|
routerPath.presentedSheet = .addRemoteLocalTimeline
|
||||||
@ -279,6 +280,10 @@ struct SettingsTabs: View {
|
|||||||
.background(theme.secondaryBackgroundColor)
|
.background(theme.secondaryBackgroundColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func moveTimelineItems(from source: IndexSet, to destination: Int) {
|
||||||
|
preferences.remoteLocalTimelines.move(fromOffsets: source, toOffset: destination)
|
||||||
|
}
|
||||||
|
|
||||||
private var cacheSection: some View {
|
private var cacheSection: some View {
|
||||||
Section("settings.section.cache") {
|
Section("settings.section.cache") {
|
||||||
if cachedRemoved {
|
if cachedRemoved {
|
||||||
|
Loading…
Reference in New Issue
Block a user