mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 18:54:11 +00:00
Add share actions to video context menu
This commit is contained in:
@@ -66,6 +66,9 @@ final class NavigationModel: ObservableObject {
|
||||
@Published var presentingSettings = false
|
||||
@Published var presentingWelcomeScreen = false
|
||||
|
||||
@Published var presentingShareSheet = false
|
||||
@Published var shareURL: URL?
|
||||
|
||||
@Published var alert = Alert(title: Text("Error"))
|
||||
@Published var presentingAlert = false
|
||||
#if os(macOS)
|
||||
@@ -205,6 +208,11 @@ final class NavigationModel: ObservableObject {
|
||||
alert = Alert(title: Text(title), message: Text(message))
|
||||
presentingAlert = true
|
||||
}
|
||||
|
||||
func presentShareSheet(_ url: URL) {
|
||||
shareURL = url
|
||||
presentingShareSheet = true
|
||||
}
|
||||
}
|
||||
|
||||
typealias TabSelection = NavigationModel.TabSelection
|
||||
|
@@ -26,7 +26,7 @@ class Segment: ObservableObject, Hashable {
|
||||
formatter.minimumFractionDigits = 0
|
||||
formatter.maximumFractionDigits = 1
|
||||
|
||||
return formatter.string(from: NSNumber(value: duration)) ?? ""
|
||||
return formatter.string(from: NSNumber(value: duration.rounded())) ?? ""
|
||||
}
|
||||
|
||||
var endTime: CMTime {
|
||||
|
Reference in New Issue
Block a user