ARK-Builders / ARK-Builders/ark-android
Improve sorting by popularity in tag selector
- Dominant language
- Kotlin
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Right now, every time we change tags, we count their popularity by resources in `TagsSelectorPresenter`.
We can collect this statistics in `StatsStorage` and use it right away
But before that, we need to make sure that statistics are collected correctly.
For example, deleting a resource without our app. In this case, we need to reduce popularity of tags of this resource.
```
private fun sortByPopularity(
tagsOfSelectedResources: List,
tagsOfUnselectedResources: List,
tagItemsByResources: Map>
) {
val tagsOfSelectedResPopularity = Popularity
.calculate(tagsOfSelectedResources)
val tagsOfUnselectedResPopularity = Popularity
.calculate(tagsOfUnselectedResources)
val tagsPopularity = Popularity
.calculate(tagItemsByResources.values.flatten())
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing tag changes through TagsSelectorPresenter, then inspect StatsStorage and Popularity.calculate to understand how popularity is currently derived. Verify the statistics collection path for resources deleted outside the app; done means tag popularity remains correct and the selector can use the collected statistics instead of recounting resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100