Fix memory leaks and add debug tools, remove ControlCenterTip
Memory optimization: - Add onDisappear cleanup for repeatForever animations in LockScreenView - Add onDisappear cleanup for animations in FeelsSubscriptionStoreView - Add onDisappear cleanup in AddMoodHeaderView and PaywallPreviewSettingsView Debug improvements: - Add test data and clear data buttons to Settings (debug builds only) TipKit changes: - Remove ControlCenterTip (unused) - Add TipKit-Tips.md documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -150,28 +150,6 @@ struct MoodStreakTip: Tip {
|
||||
static var currentStreak: Int = 0
|
||||
}
|
||||
|
||||
/// Tip for Control Center widget
|
||||
struct ControlCenterTip: Tip {
|
||||
var title: Text {
|
||||
Text("Quick Access from Control Center")
|
||||
}
|
||||
|
||||
var message: Text? {
|
||||
Text("Add Feels to Control Center for one-tap mood logging from anywhere.")
|
||||
}
|
||||
|
||||
var image: Image? {
|
||||
Image(systemName: "slider.horizontal.3")
|
||||
}
|
||||
|
||||
var rules: [Rule] {
|
||||
#Rule(Self.$daysUsingApp) { $0 >= 5 }
|
||||
}
|
||||
|
||||
@Parameter
|
||||
static var daysUsingApp: Int = 0
|
||||
}
|
||||
|
||||
// MARK: - Tips Manager
|
||||
|
||||
@MainActor
|
||||
@@ -203,7 +181,6 @@ class TipsManager {
|
||||
|
||||
func updateDaysUsingApp(_ days: Int) {
|
||||
WidgetVotingTip.daysUsingApp = days
|
||||
ControlCenterTip.daysUsingApp = days
|
||||
}
|
||||
|
||||
func updateStreak(_ streak: Int) {
|
||||
@@ -241,10 +218,6 @@ extension View {
|
||||
func moodStreakTip() -> some View {
|
||||
self.popoverTip(MoodStreakTip())
|
||||
}
|
||||
|
||||
func controlCenterTip() -> some View {
|
||||
self.popoverTip(ControlCenterTip())
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Inline Tip View
|
||||
|
||||
Reference in New Issue
Block a user