Refactor widgets into separate focused files
Split the two large widget files (~2000 lines combined) into 10 focused files: - WidgetBundle.swift: Main @main bundle registration - WidgetModels.swift: Shared data models (WatchTimelineView, SimpleEntry, etc.) - WidgetProviders.swift: Timeline providers and TimeLineCreator - WidgetSharedViews.swift: Shared voting views - FeelsTimelineWidget.swift: Timeline widget (small/medium/large) - FeelsVoteWidget.swift: Vote widget with stats views - FeelsIconWidget.swift: Custom icon widget - FeelsGraphicWidget.swift: Graphic mood widget - FeelsMoodControlWidget.swift: Control Center widget - FeelsLiveActivity.swift: Live Activity with proper previews Preserves real-time update architecture (VoteMoodIntent, WidgetCenter, WidgetDataProvider patterns). Adds proper Live Activity preview support with sample content states. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
FeelsWidget2/WidgetBundle.swift
Normal file
21
FeelsWidget2/WidgetBundle.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// WidgetBundle.swift
|
||||
// FeelsWidget
|
||||
//
|
||||
// Main widget bundle that registers all Feels widgets
|
||||
//
|
||||
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct FeelsBundle: WidgetBundle {
|
||||
var body: some Widget {
|
||||
FeelsWidget()
|
||||
FeelsGraphicWidget()
|
||||
FeelsIconWidget()
|
||||
FeelsVoteWidget()
|
||||
FeelsMoodControlWidget()
|
||||
MoodStreakLiveActivity()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user