Selaa lähdekoodia

Add pre-configured shortcut to restart live activity

Deniz Cengiz 1 vuosi sitten
vanhempi
commit
5a070ad555

+ 3 - 0
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -129487,6 +129487,9 @@
         }
       }
     },
+    "Restart Live Activity" : {
+
+    },
     "Result" : {
       "comment" : "For the  Bolus View pop-up",
       "localizations" : {

+ 9 - 0
Trio/Sources/Shortcuts/AppShortcuts.swift

@@ -66,5 +66,14 @@ struct AppShortcuts: AppShortcutsProvider {
             shortTitle: "Cancel Temp Target",
             systemImageName: "xmark.circle.fill"
         )
+        AppShortcut(
+            intent: RestartLiveActivityIntent(),
+            phrases: [
+                "Restart \(.applicationName) Live Activity",
+                "Restarts the Live Activity for \(.applicationName)"
+            ],
+            shortTitle: "Restart Live Activity",
+            systemImageName: "arrow.clockwise.circle.fill"
+        )
     }
 }