kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove mentions feature flag.
rodzic
d04e4606d2
commit
b46589cd14
|
@ -100,7 +100,7 @@ public class ComposeText extends EmojiEditText {
|
|||
protected void onSelectionChanged(int selectionStart, int selectionEnd) {
|
||||
super.onSelectionChanged(selectionStart, selectionEnd);
|
||||
|
||||
if (FeatureFlags.mentions() && getText() != null) {
|
||||
if (getText() != null) {
|
||||
boolean selectionChanged = changeSelectionForPartialMentions(getText(), selectionStart, selectionEnd);
|
||||
if (selectionChanged) {
|
||||
return;
|
||||
|
@ -192,9 +192,7 @@ public class ComposeText extends EmojiEditText {
|
|||
}
|
||||
|
||||
public void setMentionValidator(@Nullable MentionValidatorWatcher.MentionValidator mentionValidator) {
|
||||
if (FeatureFlags.mentions()) {
|
||||
mentionValidatorWatcher.setMentionValidator(mentionValidator);
|
||||
}
|
||||
mentionValidatorWatcher.setMentionValidator(mentionValidator);
|
||||
}
|
||||
|
||||
private boolean isLandscape() {
|
||||
|
@ -261,11 +259,9 @@ public class ComposeText extends EmojiEditText {
|
|||
|
||||
mentionRendererDelegate = new MentionRendererDelegate(getContext(), ThemeUtil.getThemedColor(getContext(), R.attr.conversation_mention_background_color));
|
||||
|
||||
if (FeatureFlags.mentions()) {
|
||||
addTextChangedListener(new MentionDeleter());
|
||||
mentionValidatorWatcher = new MentionValidatorWatcher();
|
||||
addTextChangedListener(mentionValidatorWatcher);
|
||||
}
|
||||
addTextChangedListener(new MentionDeleter());
|
||||
mentionValidatorWatcher = new MentionValidatorWatcher();
|
||||
addTextChangedListener(mentionValidatorWatcher);
|
||||
}
|
||||
|
||||
private boolean changeSelectionForPartialMentions(@NonNull Spanned spanned, int selectionStart, int selectionEnd) {
|
||||
|
|
|
@ -442,7 +442,7 @@ public class ConversationActivity extends PassphraseRequiredActivity
|
|||
initializeStickerObserver();
|
||||
initializeViewModel();
|
||||
initializeGroupViewModel();
|
||||
if (FeatureFlags.mentions()) initializeMentionsViewModel();
|
||||
initializeMentionsViewModel();
|
||||
initializeEnabledCheck();
|
||||
initializeSecurity(recipient.get().isRegistered(), isDefaultSms).addListener(new AssertedSuccessListener<Boolean>() {
|
||||
@Override
|
||||
|
|
|
@ -366,7 +366,7 @@ public class ManageGroupFragment extends LoggingFragment {
|
|||
});
|
||||
}
|
||||
|
||||
mentionsRow.setVisibility(FeatureFlags.mentions() && groupId.isV2() ? View.VISIBLE : View.GONE);
|
||||
mentionsRow.setVisibility(groupId.isV2() ? View.VISIBLE : View.GONE);
|
||||
mentionsRow.setOnClickListener(v -> viewModel.handleMentionNotificationSelection());
|
||||
viewModel.getMentionSetting().observe(getViewLifecycleOwner(), value -> mentionsValue.setText(value));
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ public class MediaSendActivity extends PassphraseRequiredActivity implements Med
|
|||
emojiToggle.setOnClickListener(this::onEmojiToggleClicked);
|
||||
}
|
||||
|
||||
if (FeatureFlags.mentions()) initializeMentionsViewModel();
|
||||
initializeMentionsViewModel();
|
||||
initViewModel();
|
||||
|
||||
revealButton.setOnClickListener(v -> viewModel.onRevealButtonToggled());
|
||||
|
|
|
@ -265,8 +265,7 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
|||
return true;
|
||||
}
|
||||
|
||||
return FeatureFlags.mentions() &&
|
||||
recipient.isPushV2Group() &&
|
||||
return recipient.isPushV2Group() &&
|
||||
recipient.getMentionSetting() == RecipientDatabase.MentionSetting.ALWAYS_NOTIFY &&
|
||||
DatabaseFactory.getMmsDatabase(context).getUnreadMentionCount(threadId) > 0;
|
||||
}
|
||||
|
@ -556,7 +555,7 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
|||
if (threadRecipients != null && threadRecipients.isMuted()) {
|
||||
boolean mentionsOverrideMute = threadRecipients.getMentionSetting() == RecipientDatabase.MentionSetting.ALWAYS_NOTIFY;
|
||||
|
||||
includeMessage = FeatureFlags.mentions() && mentionsOverrideMute && record.hasSelfMention();
|
||||
includeMessage = mentionsOverrideMute && record.hasSelfMention();
|
||||
}
|
||||
|
||||
if (threadRecipients == null || includeMessage) {
|
||||
|
|
|
@ -52,7 +52,6 @@ public final class FeatureFlags {
|
|||
private static final String GROUPS_V2_LINKS_VERSION = "android.groupsv2.manageGroupLinksVersion";
|
||||
private static final String GROUPS_V2_CAPACITY = "global.groupsv2.maxGroupSize";
|
||||
private static final String INTERNAL_USER = "android.internalUser";
|
||||
private static final String MENTIONS = "android.mentions";
|
||||
private static final String VERIFY_V2 = "android.verifyV2";
|
||||
private static final String PHONE_NUMBER_PRIVACY_VERSION = "android.phoneNumberPrivacyVersion";
|
||||
private static final String CLIENT_EXPIRATION = "android.clientExpiration";
|
||||
|
@ -70,7 +69,6 @@ public final class FeatureFlags {
|
|||
GROUPS_V2_LINKS_VERSION,
|
||||
INTERNAL_USER,
|
||||
USERNAMES,
|
||||
MENTIONS,
|
||||
VERIFY_V2,
|
||||
CLIENT_EXPIRATION,
|
||||
RESEARCH_MEGAPHONE_1,
|
||||
|
@ -213,11 +211,6 @@ public final class FeatureFlags {
|
|||
return getBoolean(INTERNAL_USER, false);
|
||||
}
|
||||
|
||||
/** Whether or not we allow mentions send support in groups. */
|
||||
public static boolean mentions() {
|
||||
return getBoolean(MENTIONS, false);
|
||||
}
|
||||
|
||||
/** Whether or not to use the UUID in verification codes. */
|
||||
public static boolean verifyV2() {
|
||||
return getBoolean(VERIFY_V2, false);
|
||||
|
|
Ładowanie…
Reference in New Issue