Fix build errors, resolve all warnings, and improve code quality

Widget Extension Fixes:
- Create standalone WidgetDataProvider for widget data isolation
- Add WIDGET_EXTENSION compiler flag for conditional compilation
- Fix DataController references in widget-shared files
- Sync widget version numbers with main app (23, 1.0.2)
- Add WidgetBackground color to asset catalog

Warning Resolutions:
- Fix UIScreen.main deprecation in BGView and SharingListView
- Fix Text '+' concatenation deprecation in PurchaseButtonView and SettingsTabView
- Fix exhaustive switch in BiometricAuthManager (add .none case)
- Fix var to let in ExportService (3 instances)
- Fix unused result warning in NoteEditorView
- Fix ForEach duplicate ID warnings in MonthView and YearView

Code Quality Improvements:
- Wrap bypassSubscription in #if DEBUG for security
- Rename StupidAssCustomWidgetObservableObject to CustomWidgetStateViewModel
- Add @MainActor to IconViewModel
- Replace fatalError with graceful fallback in SharedModelContainer
- Add [weak self] to closures in DayViewViewModel
- Add OSLog-based AppLogger for production logging
- Add ImageCache with NSCache for memory efficiency
- Add AccessibilityHelpers with Reduce Motion support
- Create DataControllerProtocol for dependency injection
- Update .gitignore with secrets exclusions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-20 00:48:35 -06:00
parent 31a68b7102
commit 356ce9ea62
41 changed files with 1072 additions and 187 deletions

View File

@@ -26,12 +26,12 @@ struct SharingListView: View {
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
class StupidAssObservableObject: ObservableObject {
@Published var fuckingWrappedShrable: WrappedSharable? = nil
@Published var showFuckingSheet = false
class ShareStateViewModel: ObservableObject {
@Published var selectedItem: WrappedSharable? = nil
@Published var showSheet = false
}
@StateObject private var selectedShare = StupidAssObservableObject()
@StateObject private var selectedShare = ShareStateViewModel()
var sharebleItems = [WrappedSharable]()
@MainActor
@@ -91,8 +91,8 @@ struct SharingListView: View {
func didDismiss() {
selectedShare.showFuckingSheet = false
selectedShare.fuckingWrappedShrable = nil
selectedShare.showSheet = false
selectedShare.selectedItem = nil
}
var body: some View {
@@ -100,8 +100,8 @@ struct SharingListView: View {
ScrollView {
ForEach(sharebleItems, id: \.self) { item in
Button(action: {
selectedShare.fuckingWrappedShrable = item
selectedShare.showFuckingSheet = true
selectedShare.selectedItem = item
selectedShare.showSheet = true
}, label: {
ZStack {
theme.currentTheme.secondaryBGColor
@@ -127,7 +127,7 @@ struct SharingListView: View {
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
.scaledToFill()
.clipped()
.contentShape(Path(CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 88)))
.contentShape(Rectangle())
.padding([.leading, .trailing])
})
}
@@ -139,9 +139,9 @@ struct SharingListView: View {
theme.currentTheme.bg
.edgesIgnoringSafeArea(.top)
)
.sheet(isPresented: $selectedShare.showFuckingSheet,
.sheet(isPresented: $selectedShare.showSheet,
onDismiss: didDismiss) {
selectedShare.fuckingWrappedShrable?.destination
selectedShare.selectedItem?.destination
}
}