diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index dedb15721..1f7d23835 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -536,7 +536,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers this.binding.showMedia.setOnClickListener((v) -> MediaBrowserActivity.launch(this, mConversation)); } - binding.storeInCache.setChecked(mConversation.storeInCache()); + if (xmppConnectionService != null && xmppConnectionService.getBooleanPreference("default_store_media_in_cache", R.bool.default_store_media_in_cache)) { + binding.storeInCache.setChecked(true); + } else { + binding.storeInCache.setChecked(mConversation.storeInCache()); + } binding.storeInCache.setOnCheckedChangeListener((v, checked) -> { mConversation.setStoreInCache(checked); xmppConnectionService.updateConversation(mConversation); diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index 8b983b5f0..6562979fc 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -775,7 +775,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp }); final var conversation = xmppConnectionService.findOrCreateConversation(account, contact.getJid(), false, true); - binding.storeInCache.setChecked(conversation.storeInCache()); + if (xmppConnectionService != null && xmppConnectionService.getBooleanPreference("default_store_media_in_cache", R.bool.default_store_media_in_cache)) { + binding.storeInCache.setChecked(true); + } else { + binding.storeInCache.setChecked(conversation.storeInCache()); + } binding.storeInCache.setOnCheckedChangeListener((v, checked) -> { conversation.setStoreInCache(checked); xmppConnectionService.updateConversation(conversation); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index db279aed0..157c5006e 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -1423,5 +1423,5 @@ Swipe left or right in the chats overview to archive a chat Set preferences Here you can change the default settings for some of the most important preferences before you login to enhance your privacy or security. You can change them all again after you logged in. - Default systemwide to store media in cache only. This doesn\'t change the single per chat setting inside the chat details. + Default system wide to store media in cache only. \ No newline at end of file