AppIntent fixes

This commit is contained in:
lumaa-dev 2024-12-02 04:52:43 +01:00
parent 1574357a95
commit 7a9d2c0f0e
2 changed files with 8 additions and 4 deletions

View File

@ -145,9 +145,8 @@ extension Visibility: AppEnum {
struct OpenAppIntent: AppIntent {
static var title: LocalizedStringResource = "intent.open.app"
static var description: IntentDescription? = IntentDescription("intent.open.app.description")
static var isDiscoverable: Bool = true
static var isDiscoverable: Bool = false
static var openAppWhenRun: Bool = true
static var authenticationPolicy: IntentAuthenticationPolicy = .requiresLocalDeviceAuthentication
@ -155,6 +154,11 @@ struct OpenAppIntent: AppIntent {
func perform() async throws -> some IntentResult {
UniversalNavigator.static.selectedTab = .timeline
UniversalNavigator.static.presentedSheet = nil
if UniversalNavigator.static.presentedCover != .welcome {
UniversalNavigator.static.presentedCover = nil
}
return .result()
}
}

View File

@ -13,8 +13,8 @@ struct CreatePostWidget: Widget {
) { entry in
CreatePostWidget.WidgetView()
}
.configurationDisplayName("widget.open.composer")
.description("widget.open.composer")
.configurationDisplayName(LocalizedStringKey("widget.open.composer"))
.description(LocalizedStringKey("widget.open.composer"))
.supportedFamilies([.systemSmall])
.disfavoredLocations(
[.standBy, .iPhoneWidgetsOnMac],