File tree Expand file tree Collapse file tree
Core/Sources/ChatGPTChatTab Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,17 +58,10 @@ struct ChatPanelMessages: View {
5858
5959 ChatHistory ( chat: chat)
6060 . listItemTint ( . clear)
61-
61+
6262 WithViewStore ( chat, observe: \. isReceivingMessage) { viewStore in
6363 if viewStore. state {
64- StopRespondingButton ( chat: chat)
65- . padding ( . vertical, 4 )
66- . listRowInsets ( EdgeInsets (
67- top: 0 ,
68- leading: - 8 ,
69- bottom: 0 ,
70- trailing: - 8
71- ) )
64+ Spacer ( minLength: 12 )
7265 }
7366 }
7467
@@ -110,6 +103,16 @@ struct ChatPanelMessages: View {
110103 scrollOffset = value
111104 updatePinningState ( )
112105 }
106+ . overlay ( alignment: . bottom) {
107+ WithViewStore ( chat, observe: \. isReceivingMessage) { viewStore in
108+ StopRespondingButton ( chat: chat)
109+ . padding ( . bottom, 8 )
110+ . opacity ( viewStore. state ? 1 : 0 )
111+ . disabled ( !viewStore. state)
112+ . transformEffect ( . init( translationX: 0 , y: viewStore. state ? 0 : 20 ) )
113+ . animation ( . easeInOut( duration: 0.2 ) , value: viewStore. state)
114+ }
115+ }
113116 . overlay ( alignment: . bottomTrailing) {
114117 WithViewStore ( chat, observe: \. history. last) { viewStore in
115118 Button ( action: {
You can’t perform that action at this time.
0 commit comments