Skip to content

Commit

Permalink
Merge branch 'release/08.11' of github.com:bitmark-inc/feralfile-app …
Browse files Browse the repository at this point in the history
…into release/08.11
  • Loading branch information
anhnguyenbitmark committed Nov 8, 2024
2 parents c7db525 + f6a952b commit 286e09a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
32 changes: 23 additions & 9 deletions ios/Daily Widget/Daily_Widget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@ struct Daily_WidgetEntryView : View {
private var heightReader: some View {
GeometryReader { reader in
Color.clear
.onChange(of: reader.size.height, initial: true) { oldVal, newVal in
infoViewHeight = newVal
.onAppear() {
infoViewHeight = reader.size.height
}
.onChange(of: reader.size.height) { val in
infoViewHeight = val
}
}
}
Expand Down Expand Up @@ -182,6 +185,16 @@ struct Daily_WidgetEntryView : View {
}
}

extension WidgetConfiguration {
func disableContentMarginsIfNeeded() -> some WidgetConfiguration {
if #available(iOSApplicationExtension 17.0, *) {
return self.contentMarginsDisabled()
} else {
return self
}
}
}

struct Daily_Widget: Widget {
let kind: String = "Daily_Widget"

Expand All @@ -192,16 +205,17 @@ struct Daily_Widget: Widget {
.containerBackground(.fill.tertiary, for: .widget)
} else {
Daily_WidgetEntryView(entry: entry)
.padding()
.background()
}
}
.contentMarginsDisabled()
.disableContentMarginsIfNeeded()
}
}

#Preview(as: .systemSmall) {
Daily_Widget()
} timeline: {
SimpleEntry(date: .now, dailyInfo: nil)
struct Daily_Widget_Previews: PreviewProvider {
static var previews: some View {
Daily_WidgetEntryView(
entry: SimpleEntry(date: .now, dailyInfo: nil)
)
.previewContext(WidgetPreviewContext(family: .systemSmall))
}
}
10 changes: 5 additions & 5 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@
INFOPLIST_FILE = "Daily Widget/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Daily Widget";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2167,7 +2167,7 @@
INFOPLIST_FILE = "Daily Widget/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Daily Widget";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2248,7 +2248,7 @@
INFOPLIST_FILE = "Daily Widget/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Daily Widget";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2330,7 +2330,7 @@
INFOPLIST_FILE = "Daily Widget/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Daily Widget";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2411,7 +2411,7 @@
INFOPLIST_FILE = "Daily Widget/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Daily Widget";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5833A2CF2CD381A900688F66"
BlueprintIdentifier = "5833A31E2CD472D100688F66"
BuildableName = "Daily Widget InhouseExtension.appex"
BlueprintName = "Daily Widget InhouseExtension"
ReferencedContainer = "container:Runner.xcodeproj">
Expand Down
3 changes: 2 additions & 1 deletion ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ import workmanager
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
WorkmanagerPlugin.registerPeriodicTask(withIdentifier: "feralfile.workmanager.iOSBackgroundAppRefresh", frequency: NSNumber(value: 15 * 60))
// Register a periodic task with 4 hours frequency. The frequency is in seconds.
WorkmanagerPlugin.registerPeriodicTask(withIdentifier: "feralfile.workmanager.iOSBackgroundAppRefresh", frequency: NSNumber(value: 4 * 60 * 60))

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
Expand Down

0 comments on commit 286e09a

Please sign in to comment.