Fix navigation bar items missing on timer list view

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-11-03 07:59:59 -07:00
parent 46641d2ace
commit bc2219e0a9

View file

@ -58,10 +58,6 @@ struct TimerListView: View {
self.dataStore.deleteTimer(at: index)
}
}
.navigationBarItems(
trailing: Button(action: {
self.isEditing = true
}, label: { Image(systemName: "plus").padding() } ))
.toAnyView()
}
default:
@ -73,6 +69,10 @@ struct TimerListView: View {
NavigationView {
stateContent
.navigationBarTitle("Timers")
.navigationBarItems(
trailing: Button(action: {
self.isEditing = true
}, label: { Image(systemName: "plus").padding() } ))
}
.sheet(isPresented: $isEditing,
onDismiss: { self.isEditing = false },