mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Remove reaction summary view scroll animation, keep the buttons in sync with manual horizontal scrolling
This commit is contained in:
committed by
Stefan Ceriu
parent
2354f4ff99
commit
29cda71b82
@@ -43,9 +43,7 @@ struct ReactionsSummaryView: View {
|
|||||||
HStack {
|
HStack {
|
||||||
ForEach(reactions, id: \.self) { reaction in
|
ForEach(reactions, id: \.self) { reaction in
|
||||||
ReactionSummaryButton(reaction: reaction, highlighted: selectedReactionKey == reaction.key) { key in
|
ReactionSummaryButton(reaction: reaction, highlighted: selectedReactionKey == reaction.key) { key in
|
||||||
withAnimation(.easeInOut) {
|
selectedReactionKey = key
|
||||||
selectedReactionKey = key
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.id(reaction.key)
|
.id(reaction.key)
|
||||||
}
|
}
|
||||||
@@ -54,6 +52,9 @@ struct ReactionsSummaryView: View {
|
|||||||
.onAppear {
|
.onAppear {
|
||||||
scrollView.scrollTo(selectedReactionKey, anchor: .leading)
|
scrollView.scrollTo(selectedReactionKey, anchor: .leading)
|
||||||
}
|
}
|
||||||
|
.onChange(of: selectedReactionKey) { _ in
|
||||||
|
scrollView.scrollTo(selectedReactionKey)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.top, 24)
|
.padding(.top, 24)
|
||||||
|
|||||||
Reference in New Issue
Block a user