forked from mirror/monocles_chat_clean
Fix up Add setting to default to cache or shared storage
Some checks failed
Android CI / build (pull_request) Has been cancelled
Some checks failed
Android CI / build (pull_request) Has been cancelled
This commit is contained in:
parent
91d45f18a9
commit
ecb8cd98ad
3 changed files with 11 additions and 3 deletions
|
@ -536,7 +536,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
this.binding.showMedia.setOnClickListener((v) -> MediaBrowserActivity.launch(this, mConversation));
|
this.binding.showMedia.setOnClickListener((v) -> MediaBrowserActivity.launch(this, mConversation));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.setChecked(mConversation.storeInCache());
|
||||||
|
}
|
||||||
binding.storeInCache.setOnCheckedChangeListener((v, checked) -> {
|
binding.storeInCache.setOnCheckedChangeListener((v, checked) -> {
|
||||||
mConversation.setStoreInCache(checked);
|
mConversation.setStoreInCache(checked);
|
||||||
xmppConnectionService.updateConversation(mConversation);
|
xmppConnectionService.updateConversation(mConversation);
|
||||||
|
|
|
@ -775,7 +775,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
||||||
});
|
});
|
||||||
|
|
||||||
final var conversation = xmppConnectionService.findOrCreateConversation(account, contact.getJid(), false, true);
|
final var conversation = xmppConnectionService.findOrCreateConversation(account, contact.getJid(), false, true);
|
||||||
|
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.setChecked(conversation.storeInCache());
|
||||||
|
}
|
||||||
binding.storeInCache.setOnCheckedChangeListener((v, checked) -> {
|
binding.storeInCache.setOnCheckedChangeListener((v, checked) -> {
|
||||||
conversation.setStoreInCache(checked);
|
conversation.setStoreInCache(checked);
|
||||||
xmppConnectionService.updateConversation(conversation);
|
xmppConnectionService.updateConversation(conversation);
|
||||||
|
|
|
@ -1423,5 +1423,5 @@
|
||||||
<string name="pref_swipe_to_archive_summary">Swipe left or right in the chats overview to archive a chat</string>
|
<string name="pref_swipe_to_archive_summary">Swipe left or right in the chats overview to archive a chat</string>
|
||||||
<string name="set_preferences_title">Set preferences</string>
|
<string name="set_preferences_title">Set preferences</string>
|
||||||
<string name="set_preferences_summary">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.</string>
|
<string name="set_preferences_summary">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.</string>
|
||||||
<string name="pref_store_media_in_cache">Default systemwide to store media in cache only. This doesn\'t change the single per chat setting inside the chat details.</string>
|
<string name="pref_store_media_in_cache">Default system wide to store media in cache only.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Add table
Reference in a new issue