Use custom config for chat folders.

This commit is contained in:
Michelle Tang
2024-10-17 16:48:06 -07:00
committed by Greyson Parrelli
parent cc5e3fc085
commit fdeaf77fc0
8 changed files with 78 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.components.emoji.SimpleEmojiTextView;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.ContextUtil;
import org.thoughtcrime.securesms.util.DrawableUtil;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.thoughtcrime.securesms.util.SpanUtil;
import org.thoughtcrime.securesms.util.ViewUtil;
@@ -77,9 +78,9 @@ public class FromTextView extends SimpleEmojiTextView {
setText(builder);
if (recipient.isBlocked()) setCompoundDrawablesRelativeWithIntrinsicBounds(getBlocked(), null, null, null);
else if (isPinned) setCompoundDrawablesRelativeWithIntrinsicBounds(getPinned(), null, null, null);
else setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
if (recipient.isBlocked()) setCompoundDrawablesRelativeWithIntrinsicBounds(getBlocked(), null, null, null);
else if (RemoteConfig.getShowChatFolders() && isPinned) setCompoundDrawablesRelativeWithIntrinsicBounds(getPinned(), null, null, null);
else setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
}
private Drawable getBlocked() {

View File

@@ -60,7 +60,7 @@ class ChatsSettingsFragment : DSLSettingsFragment(R.string.preferences_chats__ch
dividerPref()
if (RemoteConfig.internalUser) {
if (RemoteConfig.showChatFolders) {
sectionHeaderPref(R.string.ChatsSettingsFragment__chat_folders)
clickPref(