Add buttons for opening channel notes and joining call, in chat panel header

This commit is contained in:
Max Brunsfeld 2023-09-14 18:05:44 -07:00
parent dd7c687041
commit b75971196f
6 changed files with 100 additions and 51 deletions

View file

@ -6,7 +6,7 @@ use crate::{
pub struct Select {
handle: WeakViewHandle<Self>,
render_item: Box<dyn Fn(usize, ItemType, bool, &AppContext) -> AnyElement<Self>>,
render_item: Box<dyn Fn(usize, ItemType, bool, &mut ViewContext<Select>) -> AnyElement<Self>>,
selected_item_ix: usize,
item_count: usize,
is_open: bool,
@ -29,7 +29,9 @@ pub enum ItemType {
pub enum Event {}
impl Select {
pub fn new<F: 'static + Fn(usize, ItemType, bool, &AppContext) -> AnyElement<Self>>(
pub fn new<
F: 'static + Fn(usize, ItemType, bool, &mut ViewContext<Self>) -> AnyElement<Self>,
>(
item_count: usize,
cx: &mut ViewContext<Self>,
render_item: F,