Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joel Oksanen
individual_project
Commits
5e2a77a7
Commit
5e2a77a7
authored
Feb 25, 2020
by
Joel Oksanen
Browse files
Added animations
parent
2d911028
Changes
3
Hide whitespace changes
Inline
Side-by-side
ADAbot/ADAbot.xcodeproj/project.xcworkspace/xcuserdata/joeloksanen.xcuserdatad/UserInterfaceState.xcuserstate
View file @
5e2a77a7
No preview for this file type
ADAbot/ADAbot/Chat/FeatureView.swift
View file @
5e2a77a7
...
...
@@ -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
)
...
...
ADAbot/ADAbot/Chat/MessageView.swift
View file @
5e2a77a7
...
...
@@ -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
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment