feat: hide advertorials in Kubus feeds #191
No reviewers
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches!191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/167-kubus-advertorials"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #167
New Kubus patch Hide advertorials (toggle
hide_advertorials, "Verberg advertorials", default on, category Ads / "Advertenties en promotie"). It removes advertorials from the home and section feeds.Builds on #189 (
fix/kubus-9.24.1), which is merged into this branch. Merge #189 first; after that this diff only shows the advertorials change.How advertorials are flagged
ArticleIteminside an ordinary feed block, withisAdvertorial()true, meaningarticleTypeequalsADVERTORIAL(ignoring case).ArticleItemkeeps its class name andisAdvertorial()in every version:com.popular.core.model.data.ArticleItem(Tubantia 9.22.0 decompile; the 9.21.1 dex has the same strings)com.kubusapp.feature.sections.model.ArticleItem, a kotlinx.serialization class (9.24.1 decompile and dex)pu2CarouselTeaser,bp5DossierTeaser,fb2BreakingNewsTeaser,jhb/omjMini-/VideoCarouselTeaser, ...).Design
KubusAdvertorials.stripis the last rule of the existing shared feed teaser filter (KubusContentFilters.filterFeedTeasers). It reads the toggle withisActive(). There is no new smali: the patch only depends onmidasSettingsPatchandfeedTeaserFilterPatchand registers the toggle.KubusModels.typeName==ArticleItem.isAdvertorial(). If that method is ever missing, it falls back toarticleTyperead by name throughtoString().b/e) both change. An immutable list is replaced by a filtered copy in every field that holds it.a/f), by the first editorial item of the block's lists, and that item leaves the list. A mixed row keeps its editorial items.ContentFiltercatches the failure. The hook itself still has its never-throw wrapper.Verification
gradlew buildAndroid(incl. extension contract check)gradlew :extensions:extension:testDebugUnitTestKubusAdvertorialsTest)check-patches.shTubantia 9.24.1 XAPKcheck-patches.shAD 9.24.1 XAPKcheck-patches.shTubantia 9.21.1 XAPKThe tests cover:
a/b/e/f) blocksarticleTypefallbackNot device-tested. It is not verified that the feeds carry advertorials right now, or how a promoted primary looks in each block type.
Edition
Edition has no comparable feed flag. Checked in de Volkskrant 7.53.1:
ADVERTORIALis aStyleVariantDtovalue of the article page only (ArticleStyle.Advertorial,ArticleType.Advertorial,AdvertorialHeader, footer). Apart from Hilt wiring, nothing outsidenl.persgroep.edition.articlementions it. Edition is not changed in this PR.🤖 Generated with Claude Code
Merged into dev through the integration PR #195 (same commits), released as v1.11.0-dev.10.
Pull request closed