Action history is logged and displayed to the user's library. These are triggered whenever the magnet choice sheet is displayed. Also redo alerts and action sheets to avoid deprecation notices for >iOS 14. These will be removed when iOS 14 support is dropped. There was also a problem with sheet presentation not working after a sheet was dismissed. Disable the appropriate view when a sheet is being presented. Signed-off-by: kingbri <bdashore3@proton.me>
25 lines
520 B
Swift
25 lines
520 B
Swift
//
|
|
// DisableInteraction.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 9/13/22.
|
|
//
|
|
// Disables interaction without applying the appearance
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct DisableInteraction: ViewModifier {
|
|
let disabled: Bool
|
|
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.overlay {
|
|
if disabled {
|
|
Color.clear
|
|
.contentShape(Rectangle())
|
|
.gesture(TapGesture())
|
|
}
|
|
}
|
|
}
|
|
}
|