wordpress-mobile / wordpress-mobile/WordPress-Android
Bug: Self-hosted sites Reader Tab does not default to Discover
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Expected behavior
When logging in with a self-hosted and tapping the “Reader” tab, the default tab should be “Discover”.
Actual behavior
When logging in with a self-hosted and tapping the “Reader” tab, the default tab is "Following"
Notes from Slack Chat
- The "following" readerTag is manually created as the defaultInMemory value for self-hosted sites in
LoadReaderTabsUseCase(see here) - Expecting
appPrefsWrapper.getReaderTag()?to return null andtagList.find { it.isDefaultSelectedTab() }to set the Discover tab (see here) - The
onTagChangedevent is raised from
_uiState.value = ContentUiState(
tagList.map { it.label },
tagList,
searchIconVisible = isSearchSupported(),
settingsIconVisible = isSettingsSupported()
)
However this event is raised multiple times and not before the default is set from ReaderViewModel.start.loadtabscall
I pushed my log line branch issue/14565-reader-tab-not-default-to-discover-logs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LoadReaderTabsUseCase.kt, especially the self-hosted defaultInMemory readerTag, then trace ReaderViewModel.start.loadtabs and the onTagChanged event described in ReaderViewModel.kt. Done means opening Reader on a self-hosted site selects Discover by default rather than Following, without changing the expected behavior for other sites.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100