diff --git a/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepository.kt b/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepository.kt index 5e1d8b87..962b62b7 100644 --- a/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepository.kt +++ b/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepository.kt @@ -2,13 +2,7 @@ package io.github.stozo04.openloop.data import kotlinx.coroutines.flow.Flow -/** - * Contract for reading and writing user preferences. - * - * Backed by Jetpack DataStore (Preferences). The ViewModel depends on - * this interface — never on the implementation — so tests can swap in - * a fake without touching the real DataStore. - */ +/** Contract for reading and writing user preferences (onboarding, flags, saved-loop count). */ interface UserPreferencesRepository { /** Emits `true` once the user has completed the onboarding carousel. */ diff --git a/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepositoryImpl.kt b/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepositoryImpl.kt index fa5fcea1..f87a5bca 100644 --- a/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepositoryImpl.kt +++ b/app/src/main/java/io/github/stozo04/openloop/data/UserPreferencesRepositoryImpl.kt @@ -21,13 +21,7 @@ val Context.dataStore: DataStore by preferencesDataStore( name = "openloop_preferences" ) -/** - * Production implementation of [UserPreferencesRepository]. - * - * Reads are exposed as [Flow] (never blocking). Writes use [DataStore.edit] - * which is atomic and transactional. IOException is caught on reads and - * falls back to safe defaults (e.g. show onboarding again). - */ +/** Production implementation of [UserPreferencesRepository]. */ class UserPreferencesRepositoryImpl( private val dataStore: DataStore ) : UserPreferencesRepository { @@ -36,10 +30,6 @@ class UserPreferencesRepositoryImpl( val HAS_COMPLETED_ONBOARDING = booleanPreferencesKey("has_completed_onboarding") val HAS_SEEN_SPEED_CURVE_INTRO = booleanPreferencesKey("has_seen_speed_curve_intro") val SAVED_LOOP_COUNT = intPreferencesKey("saved_loop_count") - // Future keys: - // val CAPTURE_DURATION_MS = longPreferencesKey("capture_duration_ms") - // val DEFAULT_PLAYBACK_SPEED = floatPreferencesKey("default_playback_speed") - // val AUDIO_ENABLED = booleanPreferencesKey("audio_enabled") } override val hasCompletedOnboarding: Flow = dataStore.data diff --git a/app/src/main/java/io/github/stozo04/openloop/diagnostics/FirebaseAnalyticsReporterImpl.kt b/app/src/main/java/io/github/stozo04/openloop/diagnostics/FirebaseAnalyticsReporterImpl.kt index 6e58c407..8d727976 100644 --- a/app/src/main/java/io/github/stozo04/openloop/diagnostics/FirebaseAnalyticsReporterImpl.kt +++ b/app/src/main/java/io/github/stozo04/openloop/diagnostics/FirebaseAnalyticsReporterImpl.kt @@ -43,7 +43,6 @@ internal class FirebaseAnalyticsReporterImpl( is Long -> putLong(key, value) is Int -> putLong(key, value.toLong()) is Double -> putDouble(key, value) - is Float -> putDouble(key, value.toDouble()) is Boolean -> putBoolean(key, value) else -> Log.w(TAG, "logEvent($name) dropped param '$key' of type ${value::class.simpleName}") } diff --git a/baselineprofile/src/main/java/io/github/stozo04/openloop/baselineprofile/BaselineProfileGenerator.kt b/baselineprofile/src/main/java/io/github/stozo04/openloop/baselineprofile/BaselineProfileGenerator.kt index 5518c4a3..a245b5f8 100644 --- a/baselineprofile/src/main/java/io/github/stozo04/openloop/baselineprofile/BaselineProfileGenerator.kt +++ b/baselineprofile/src/main/java/io/github/stozo04/openloop/baselineprofile/BaselineProfileGenerator.kt @@ -14,12 +14,8 @@ class BaselineProfileGenerator { @Test fun generate() = baselineProfileRule.collect( packageName = "io.github.stozo04.openloop", - // Check if there are other critical paths like Camera or Video Editor includeInStartupProfile = true ) { - // This block defines the interactions to be profiled. - // For a basic profile, just starting the app is often enough, - // but we can add more interactions here. pressHome() startActivityAndWait() }