diff --git a/Tusker/Screens/Compose/ComposePollView.swift b/Tusker/Screens/Compose/ComposePollView.swift index f1d9f8b5..ebc4526f 100644 --- a/Tusker/Screens/Compose/ComposePollView.swift +++ b/Tusker/Screens/Compose/ComposePollView.swift @@ -51,9 +51,20 @@ struct ComposePollView: View { .hoverEffect() } - ForEach(Array(poll.options.enumerated()), id: \.element.id) { (e) in - ComposePollOption(poll: poll, option: e.element, optionIndex: e.offset) + List { + ForEach(Array(poll.options.enumerated()), id: \.element.id) { (e) in + ComposePollOption(poll: poll, option: e.element, optionIndex: e.offset) + .frame(height: 36) + .listRowInsets(EdgeInsets(top: 4, leading: 0, bottom: 4, trailing: 0)) + .listRowSeparator(.hidden) + .listRowBackground(Color.clear) + } + .onMove { indices, newIndex in + poll.options.move(fromOffsets: indices, toOffset: newIndex) + } } + .listStyle(.plain) + .frame(height: 44 * CGFloat(poll.options.count)) Button(action: self.addOption) { Label("Add Option", systemImage: "plus")