Просмотр исходного кода

Fix ambiguous '/' operator on CGFloat opacity divisor

trioneer недель назад: 2
Родитель
Сommit
1890f0ac55
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Trio/Sources/Services/Alerts/TrioModalAlertScheduler.swift

+ 1 - 1
Trio/Sources/Services/Alerts/TrioModalAlertScheduler.swift

@@ -248,7 +248,7 @@ struct TrioAlertBanner: View {
         .shadow(color: .black.opacity(0.18), radius: 12, y: 4)
         .shadow(color: .black.opacity(0.18), radius: 12, y: 4)
         .contentShape(RoundedRectangle(cornerRadius: 22, style: .continuous))
         .contentShape(RoundedRectangle(cornerRadius: 22, style: .continuous))
         .offset(y: min(0, dragOffset.height))
         .offset(y: min(0, dragOffset.height))
-        .opacity(1 - min(abs(dragOffset.height) / 200, 0.4))
+        .opacity(1 - min(abs(dragOffset.height) / CGFloat(200), 0.4))
         .gesture(
         .gesture(
             // Swipe-up — iOS-banner gesture; tracks the drag visually then
             // Swipe-up — iOS-banner gesture; tracks the drag visually then
             // commits a 20-minute snooze past −50pt. Springs back otherwise.
             // commits a 20-minute snooze past −50pt. Springs back otherwise.