Skip to content

Commit 7454523

Browse files
authored
Merge pull request #73 from mcintyre94/resize-chat-box-on-clear-dd2e6063
Reset chat input bar height when text is cleared after sending
2 parents 73e59a4 + fbaa2b7 commit 7454523

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Wisp/Views/SpriteDetail/Chat/ChatInputBar.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ struct ChatInputBar: View {
109109
.buttonStyle(.glass)
110110
}
111111
}
112+
.onChange(of: text) { _, newValue in
113+
if newValue.isEmpty { textInputHeight = 36 }
114+
}
112115
.animation(.easeInOut(duration: 0.2), value: attachedFiles.count)
113116
.animation(.easeInOut(duration: 0.2), value: lastUploadedFileName)
114117
.padding(.horizontal)

0 commit comments

Comments
 (0)