Refined the recording Live Activity presentation in the Widget target.
This commit is contained in:
@@ -5,14 +5,14 @@ import WidgetKit
|
||||
/// The timer of the elapsed recording time, formatted as `mm:ss`: counted up by the system from the content state's anchor when
|
||||
/// one is given, and frozen at the reported elapsed time otherwise.
|
||||
struct RecordingTimerText: View {
|
||||
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
|
||||
/// The dynamic content of the Live Activity to render.
|
||||
let state: RecordingActivityAttributes.ContentState
|
||||
|
||||
|
||||
// MARK: Body
|
||||
|
||||
|
||||
var body: some View {
|
||||
if let anchor = state.anchor {
|
||||
Text(
|
||||
@@ -29,20 +29,20 @@ struct RecordingTimerText: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
|
||||
private extension RecordingTimerText {
|
||||
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
|
||||
/// The format of the timer: minutes and seconds, as `mm:ss`.
|
||||
var timerFormat: Duration.TimeFormatStyle {
|
||||
.time(pattern: .minuteSecond(padMinuteToLength: 2))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
Reference in New Issue
Block a user