kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove multi-forward feature flag.
rodzic
7465818f44
commit
1a21cafe6c
|
@ -116,7 +116,7 @@ final class MenuState {
|
||||||
!viewOnce &&
|
!viewOnce &&
|
||||||
!remoteDelete &&
|
!remoteDelete &&
|
||||||
!hasPendingMedia &&
|
!hasPendingMedia &&
|
||||||
((FeatureFlags.forwardMultipleMessages() && selectedParts.size() <= MAX_FORWARDABLE_COUNT) || selectedParts.size() == 1);
|
selectedParts.size() <= MAX_FORWARDABLE_COUNT;
|
||||||
|
|
||||||
int uniqueRecords = selectedParts.stream()
|
int uniqueRecords = selectedParts.stream()
|
||||||
.map(MultiselectPart::getMessageRecord)
|
.map(MultiselectPart::getMessageRecord)
|
||||||
|
|
|
@ -13,7 +13,6 @@ import org.thoughtcrime.securesms.database.model.MmsMessageRecord
|
||||||
import org.thoughtcrime.securesms.mms.MediaConstraints
|
import org.thoughtcrime.securesms.mms.MediaConstraints
|
||||||
import org.thoughtcrime.securesms.mms.SlideDeck
|
import org.thoughtcrime.securesms.mms.SlideDeck
|
||||||
import org.thoughtcrime.securesms.mms.TextSlide
|
import org.thoughtcrime.securesms.mms.TextSlide
|
||||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
|
||||||
import org.thoughtcrime.securesms.util.Util
|
import org.thoughtcrime.securesms.util.Util
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,10 +28,6 @@ object Multiselect {
|
||||||
fun getParts(conversationMessage: ConversationMessage): MultiselectCollection {
|
fun getParts(conversationMessage: ConversationMessage): MultiselectCollection {
|
||||||
val messageRecord = conversationMessage.messageRecord
|
val messageRecord = conversationMessage.messageRecord
|
||||||
|
|
||||||
if (!FeatureFlags.forwardMultipleMessages()) {
|
|
||||||
return MultiselectCollection.Single(MultiselectPart.Message(conversationMessage))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (messageRecord.isUpdate) {
|
if (messageRecord.isUpdate) {
|
||||||
return MultiselectCollection.Single(MultiselectPart.Update(conversationMessage))
|
return MultiselectCollection.Single(MultiselectPart.Update(conversationMessage))
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,12 +117,9 @@ class MultiselectForwardFragment :
|
||||||
val shareSelectionRecycler: RecyclerView = bottomBar.findViewById(R.id.selected_list)
|
val shareSelectionRecycler: RecyclerView = bottomBar.findViewById(R.id.selected_list)
|
||||||
val shareSelectionAdapter = ShareSelectionAdapter()
|
val shareSelectionAdapter = ShareSelectionAdapter()
|
||||||
val sendButton: View = bottomBar.findViewById(R.id.share_confirm)
|
val sendButton: View = bottomBar.findViewById(R.id.share_confirm)
|
||||||
val addMessageWrapper: View = bottomBar.findViewById(R.id.add_message_wrapper)
|
|
||||||
|
|
||||||
addMessage = bottomBar.findViewById(R.id.add_message)
|
addMessage = bottomBar.findViewById(R.id.add_message)
|
||||||
|
|
||||||
addMessageWrapper.visible = FeatureFlags.forwardMultipleMessages()
|
|
||||||
|
|
||||||
sendButton.setOnClickListener {
|
sendButton.setOnClickListener {
|
||||||
sendButton.isEnabled = false
|
sendButton.isEnabled = false
|
||||||
viewModel.send(addMessage.text.toString())
|
viewModel.send(addMessage.text.toString())
|
||||||
|
|
|
@ -82,7 +82,6 @@ public final class FeatureFlags {
|
||||||
private static final String RETRY_RECEIPTS = "android.retryReceipts";
|
private static final String RETRY_RECEIPTS = "android.retryReceipts";
|
||||||
private static final String SUGGEST_SMS_BLACKLIST = "android.suggestSmsBlacklist";
|
private static final String SUGGEST_SMS_BLACKLIST = "android.suggestSmsBlacklist";
|
||||||
private static final String ANNOUNCEMENT_GROUPS = "android.announcementGroups";
|
private static final String ANNOUNCEMENT_GROUPS = "android.announcementGroups";
|
||||||
private static final String FORWARD_MULTIPLE_MESSAGES = "android.forward.multiple.messages";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||||
|
@ -118,8 +117,7 @@ public final class FeatureFlags {
|
||||||
SENDER_KEY,
|
SENDER_KEY,
|
||||||
RETRY_RECEIPTS,
|
RETRY_RECEIPTS,
|
||||||
SUGGEST_SMS_BLACKLIST,
|
SUGGEST_SMS_BLACKLIST,
|
||||||
ANNOUNCEMENT_GROUPS,
|
ANNOUNCEMENT_GROUPS
|
||||||
FORWARD_MULTIPLE_MESSAGES
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
@ -385,11 +383,6 @@ public final class FeatureFlags {
|
||||||
return getString(SUGGEST_SMS_BLACKLIST, "");
|
return getString(SUGGEST_SMS_BLACKLIST, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Whether the user is able to forward multiple messages at once */
|
|
||||||
public static boolean forwardMultipleMessages() {
|
|
||||||
return getBoolean(FORWARD_MULTIPLE_MESSAGES, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Only for rendering debug info. */
|
/** Only for rendering debug info. */
|
||||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||||
return new TreeMap<>(REMOTE_VALUES);
|
return new TreeMap<>(REMOTE_VALUES);
|
||||||
|
|
Ładowanie…
Reference in New Issue