Automattic / Automattic/pocket-casts-android
`const val` not being used in au.com.shiftyjelly.pocketcasts.ui.theme.ThemeColor.kt
- Dominant language
- Kotlin
- Stars
- 2.8k
- Forks
- 308
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 143
Description
### Description
I realized while doing some memory profiling that ThemeColor.kt uses a fairly big amount of memory for what is essentially a constants class. I believe a slight reduction in memory use could be obtained from prepending `const` to all the colors defined in ThemeColor.kt
### Step-by-step reproduction instructions
1. Open up Pocket Casts on Android Studio with profiling with complete data
2. Capture a heap dump
3. Observe that ThemeColor.kt will be one of the objects with the highest memory use
### Screenshots or screen recording

### Did you search for existing bug reports?
- [X] I have searched for existing bug reports.
### Device, Operating system, and Pocket Casts app version
API level 34, Linux. Tested on Pixel 7 Pro emulator and a real Samsung S21
Contributor guide
Research direction
Open ThemeColor.kt and inspect the color definitions that currently lack const. Apply the requested change to all applicable colors, then use the Android Studio memory profiler and a heap dump to check whether ThemeColor.kt uses less memory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100