mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Tweaks for macOS (#1383)
* Fix constant Create Room button animation on macOS. * Allow right-clicking on timeline items to work again on macOS. * Use inline media upload previews on macOS This comes with the caveat that the previews are no longer interactive.
This commit is contained in:
@@ -40,13 +40,15 @@ struct ShimmerModifier: ViewModifier {
|
||||
/// The colour that causes the view to remain unchanged.
|
||||
private let regularColor = Color.white
|
||||
|
||||
/// A slow linear animation which auto-repeats after a delay.
|
||||
private let animation: Animation = Tests.isRunningUITests ? .noAnimation : .linear(duration: 1.75).delay(0.5).repeatForever(autoreverses: false)
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.mask { gradient }
|
||||
.animation(animation, value: animationTrigger)
|
||||
.task {
|
||||
withElementAnimation(.linear(duration: 1.75).delay(0.5).repeatForever(autoreverses: false)) {
|
||||
animationTrigger.toggle()
|
||||
}
|
||||
animationTrigger.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user