Fetch channel members before constructing channel mgmt modal

This commit is contained in:
Max Brunsfeld 2023-08-03 12:10:53 -07:00
parent 6c4964f071
commit 9a1dd0c6bc
3 changed files with 19 additions and 10 deletions

View file

@ -17,6 +17,7 @@ pub fn build_channel_modal(
user_store: ModelHandle<UserStore>,
channel_store: ModelHandle<ChannelStore>,
channel: ChannelId,
members: HashMap<UserId, ChannelMemberStatus>,
cx: &mut ViewContext<ChannelModal>,
) -> ChannelModal {
Picker::new(
@ -26,7 +27,7 @@ pub fn build_channel_modal(
user_store,
channel_store,
channel_id: channel,
member_statuses: Default::default(),
member_statuses: members,
},
cx,
)