pub fn toggle_collapse_focused_comment(&mut self) {
        let id = self.get_focus_index();
        let comment = self.comments[id].clone();
        match comment.state {
            client::CommentState::Collapsed => {
                panic!(
                    "invalid comment state `Collapsed` when calling `toggle_collapse_focused_comment`"
                );
            }
            client::CommentState::PartiallyCollapsed => {
                self.get_comment_component_mut(id)
                    .get_inner_mut()
                    .get_inner_mut()
                    .set_content(comment.text);
                self.toggle_comment_collapse_state(id + 1, self.comments[id].height);
                self.comments[id].state = client::CommentState::Normal;
            }
            client::CommentState::Normal => {
                self.get_comment_component_mut(id)
                    .get_inner_mut()
                    .get_inner_mut()
                    .set_content(comment.minimized_text);
                self.toggle_comment_collapse_state(id + 1, self.comments[id].height);
                self.comments[id].state = client::CommentState::PartiallyCollapsed;
            }
        };
    }
/// Toggle the collapsing state of currently focused comment and its children
Toggle the collapsing state of currently focused comment and its children
Toggle the collapsing state of currently focused comment and its children
pub fn toggle_collapse_focused_comment(&mut self) {
        let id = self.get_focus_index();
        let comment = self.comments[id].clone();
        match comment.state {
            client::CommentState::Collapsed => {
                panic!(
                    "invalid comment state `Collapsed` when calling `toggle_collapse_focused_comment`"
                );
            }
            client::CommentState::PartiallyCollapsed => {
                self.get_comment_component_mut(id)
                    .get_inner_mut()
                    .get_inner_mut()
                    .set_content(comment.text);
                self.toggle_comment_collapse_state(id + 1, self.comments[id].height);
                self.comments[id].state = client::CommentState::Normal;
            }
            client::CommentState::Normal => {
                self.get_comment_component_mut(id)
                    .get_inner_mut()
                    .get_inner_mut()
                    .set_content(comment.minimized_text);
                self.toggle_comment_collapse_state(id + 1, self.comments[id].height);
                self.comments[id].state = client::CommentState::PartiallyCollapsed;
            }
        };
    }
pub fn toggle_collapse_focused_comment ( & mut self ) { let id = self . get_focus_index ( ) ; let comment = self . comments [ id ] . clone ( ) ; match comment . state { client :: CommentState :: Collapsed => { panic ! ( " " ) ; } client :: CommentState :: PartiallyCollapsed => { self . get_comment_component_mut ( id ) . get_inner_mut ( ) . get_inner_mut ( ) . set_content ( comment . text ) ; self . toggle_comment_collapse_state ( id + 1 , self . comments [ id ] . height ) ; self . comments [ id ] . state = client :: CommentState :: Normal ; } client :: CommentState :: Normal => { self . get_comment_component_mut ( id ) . get_inner_mut ( ) . get_inner_mut ( ) . set_content ( comment . minimized_text ) ; self . toggle_comment_collapse_state ( id + 1 , self . comments [ id ] . height ) ; self . comments [ id ] . state = client :: CommentState :: PartiallyCollapsed ; } } ; }
Toggle the collapsing state of currently focused comment and its children
Toggle the collapsing state of currently focused comment and its children
&mut self