mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-10 23:33:29 +01:00
[AltWidget] Supports refreshing apps directly from home screen
This commit is contained in:
@@ -24,4 +24,33 @@ extension View
|
||||
background(backgroundView)
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func invalidatableContentIfAvailable() -> some View
|
||||
{
|
||||
if #available(iOSApplicationExtension 17, *)
|
||||
{
|
||||
self.invalidatableContent()
|
||||
}
|
||||
else
|
||||
{
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func activatesRefreshAllAppsIntent() -> some View
|
||||
{
|
||||
if #available(iOSApplicationExtension 17, *)
|
||||
{
|
||||
Button(intent: RefreshAllAppsWidgetIntent()) {
|
||||
self
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
else
|
||||
{
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user