Summary
VIEW_STORAGE_SCRAP is emitted from two places in StorageScrapFragment, which can overcount screen views in analytics.
Why this matters
The event is currently logged:
- when the screen is created (
onViewCreated()), and
- again after a successful scrap-course load.
Because of this, a single visit can be counted more than once, and pull-to-refresh can also inflate screen-view metrics.
Affected area
app/src/main/java/com/runnect/runnect/presentation/storage/StorageScrapFragment.kt
Proposed change
Keep VIEW_STORAGE_SCRAP logging in a single place only.
- Prefer treating the screen entry point as the source of truth for the screen-view event.
- Remove the duplicate analytics emission from the load-success path.
- Preserve the existing course state update behavior.
Acceptance criteria
VIEW_STORAGE_SCRAP is emitted exactly once per screen entry.
- Refreshing the screen does not emit additional screen-view events.
- Loading success still updates the UI state as before.
Backlinks
Requested by: @unam98
Summary
VIEW_STORAGE_SCRAPis emitted from two places inStorageScrapFragment, which can overcount screen views in analytics.Why this matters
The event is currently logged:
onViewCreated()), andBecause of this, a single visit can be counted more than once, and pull-to-refresh can also inflate screen-view metrics.
Affected area
app/src/main/java/com/runnect/runnect/presentation/storage/StorageScrapFragment.ktProposed change
Keep
VIEW_STORAGE_SCRAPlogging in a single place only.Acceptance criteria
VIEW_STORAGE_SCRAPis emitted exactly once per screen entry.Backlinks
Requested by: @unam98