Initial actionbar model refactor

This commit is contained in:
William Casarin
2023-06-22 14:10:16 +02:00
parent 337c4de337
commit d0eb86dfa3
7 changed files with 41 additions and 38 deletions

View File

@@ -153,7 +153,7 @@ struct TextEvent: View {
}
var ActionBar: some View {
return EventActionBar(damus_state: damus, event: event)
return EventActionBar(damus_state: damus, event: event, bar: get_actionbar(state: damus, evid: event.id))
.padding([.top], 4)
}
@@ -229,3 +229,7 @@ struct TextEvent_Previews: PreviewProvider {
}
}
func get_actionbar(state: DamusState, evid: String) -> ActionBarModel {
return state.events.get_cache_data(evid).bar_model
}