fix(memory-widget: add init method for service and update ios widget

This commit is contained in:
Prateek Sunal
2025-03-20 00:14:29 +05:30
parent a002b26114
commit 4e3bec7ad7
2 changed files with 2 additions and 30 deletions

View File

@@ -146,36 +146,6 @@ struct SlideshowWidgetEntryView: View {
.backwardWidgetFullColorRenderingMode()
.aspectRatio(contentMode: .fill)
.frame(width: geometry.size.width, height: geometry.size.height)
.overlay(
LinearGradient(
gradient: Gradient(colors: [
Color.black.opacity(0.7), Color.clear,
]),
startPoint: .bottom,
endPoint: .top
)
.frame(height: geometry.size.height * 0.4)
.frame(maxHeight: .infinity, alignment: .bottom)
.backwardWidgetAccentable(true)
)
.overlay(
VStack(alignment: .leading, spacing: 2) {
Text(data!.string(forKey: "title") ?? "").font(
.custom("Inter", size: 14, relativeTo: .caption)
) // Custom with fallback
.bold()
.foregroundStyle(.white)
.shadow(radius: 20)
Text(data!.string(forKey: "subTitle") ?? "")
.font(.custom("Inter", size: 12, relativeTo: .caption2))
.foregroundStyle(.white)
.shadow(radius: 20)
}
.padding(.leading, geometry.size.width * 0.05)
.padding(.bottom, geometry.size.height * 0.05),
alignment: .bottomLeading
)
}
} else if let data = Data(
base64Encoded: defaultBase64Image),

View File

@@ -258,6 +258,8 @@ Future<void> _init(bool isBackground, {String via = ''}) async {
await SyncService.instance.init(preferences);
_logger.info("SyncService init done $tlog");
await HomeWidgetService.instance.init(preferences);
if (!isBackground) {
await _scheduleFGHomeWidgetSync();
}