Commit 5e2a77a7 authored by  Joel  Oksanen's avatar Joel Oksanen
Browse files

Added animations

parent 2d911028
......@@ -38,7 +38,11 @@ struct FeatureView: View {
ForEach(self.arguments, id: \.id) { argument in
FeatureBubble(argument: argument,
showingQueryOptionsForArgument: self.$showingQueryOptionsForArgument)
.onTapGesture { self.showingQueryOptionsForArgument = argument }
.onTapGesture {
withAnimation(.easeInOut(duration: 0.3)) {
self.showingQueryOptionsForArgument = argument
}
}
}
Spacer()
.frame(width: 10)
......
......@@ -51,10 +51,10 @@ struct MessageView: View {
.background(MessageBubble(sender: message.sender).foregroundColor(sent ? bubbleColors[message.sender] : FeatureView.bubbleColor))
.frame(minWidth: 0, maxWidth: maxWidth, alignment: message.sender == .ADA ? .leading : .trailing)
.onTapGesture {
if self.message.sender == .ADA {
self.chatManager.showOptionsFor(self.message as! ADAMessage)
} else if !self.sent {
withAnimation(Animation.easeInOut(duration: 0.3)) {
withAnimation(.easeInOut(duration: 0.3)) {
if self.message.sender == .ADA {
self.chatManager.showOptionsFor(self.message as! ADAMessage)
} else if !self.sent {
self.chatManager.sendQuery(query: self.query!)
self.sent = true
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment