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:
Doug
2023-07-24 13:08:50 +01:00
committed by GitHub
parent de199382de
commit 43dafda3ef
15 changed files with 144 additions and 86 deletions
@@ -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()
}
}