File tree Expand file tree Collapse file tree
Core/Sources/SuggestionWidget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,8 +25,11 @@ struct WidgetView: View {
2525 Circle ( ) . fill ( isHovering ? . white. opacity ( 0.8 ) : . white. opacity ( 0.3 ) )
2626 . onTapGesture {
2727 withAnimation ( . easeInOut( duration: 0.2 ) ) {
28- let isDisplayed = panelViewModel. isPanelDisplayed
29- || chatWindowViewModel. isPanelDisplayed
28+ let isDisplayed = {
29+ if panelViewModel. isPanelDisplayed && panelViewModel. content != nil { return true }
30+ if chatWindowViewModel. isPanelDisplayed && chatWindowViewModel. chat != nil { return true }
31+ return false
32+ } ( )
3033 panelViewModel. isPanelDisplayed = !isDisplayed
3134 chatWindowViewModel. isPanelDisplayed = !isDisplayed
3235 }
@@ -75,6 +78,7 @@ struct WidgetView: View {
7578 }
7679 . onChange ( of: viewModel. isProcessing) { _ in refreshRing ( ) }
7780 . onChange ( of: panelViewModel. content? . contentHash) { _ in refreshRing ( ) }
81+ . onChange ( of: chatWindowViewModel. chat? . id) { _ in refreshRing ( ) }
7882 . onHover { yes in
7983 withAnimation ( . easeInOut( duration: 0.2 ) ) {
8084 isHovering = yes
You can’t perform that action at this time.
0 commit comments