Refined the recording Live Activity presentation in the Widget target.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import Commanding
|
||||
import SwiftUI
|
||||
|
||||
extension RecordingActivityState {
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
/// The system symbol marking the state in the Live Activity: a microphone while recording, a pause symbol while paused, and
|
||||
/// a send symbol while the recorded input is being processed.
|
||||
var symbol: Image {
|
||||
switch self {
|
||||
case .recording: Image.Symbol.microphone
|
||||
case .paused: Image.Symbol.pause
|
||||
case .processing: Image.Symbol.send
|
||||
}
|
||||
}
|
||||
|
||||
/// The tint coloring the state's ``symbol``: yellow while recording or paused, and green while the recorded input is being
|
||||
/// processed.
|
||||
var tint: Color {
|
||||
switch self {
|
||||
case .recording, .paused: .yellow
|
||||
case .processing: .green
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user