Skip to content

add a low-data-mode option to disable images#438

Open
sratabix wants to merge 1 commit intogotify:masterfrom
sratabix:low-data-mode
Open

add a low-data-mode option to disable images#438
sratabix wants to merge 1 commit intogotify:masterfrom
sratabix:low-data-mode

Conversation

@sratabix
Copy link
Contributor

@sratabix sratabix commented Feb 9, 2026

This option disables the loading of images from the server

error(R.drawable.ic_alarm)
placeholder(R.drawable.ic_placeholder)
if (lowDataMode) {
holder.image.visibility = View.GONE
Copy link
Member

@jmattheis jmattheis Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered setting https://coil-kt.github.io/coil/api/coil-core/coil3.request/-options/network-cache-policy.html to CachePolicy.Disabled in com.github.gotify.CoilInstance#makeImageLoader? This should display already cache images, but doesn't request images that aren't cached.

This would remove the need to implement the lowDataMode for every image loading done in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants