Inline manual group migration feature flag.
This commit is contained in:
parent
b809008291
commit
69884935f3
4 changed files with 3 additions and 18 deletions
|
@ -193,7 +193,6 @@ final class ConversationGroupViewModel extends ViewModel {
|
|||
if (record == null ||
|
||||
!record.isV1Group() ||
|
||||
!record.isActive() ||
|
||||
!FeatureFlags.groupsV1ManualMigration() ||
|
||||
FeatureFlags.groupsV1ForcedMigration() ||
|
||||
Recipient.self().getGroupsV1MigrationCapability() != Recipient.Capability.SUPPORTED ||
|
||||
!Recipient.resolved(record.getRecipientId()).isProfileSharing())
|
||||
|
|
|
@ -86,11 +86,6 @@ public final class GroupsV1MigrationUtil {
|
|||
throw new InvalidMigrationStateException();
|
||||
}
|
||||
|
||||
if (forced && !FeatureFlags.groupsV1ManualMigration()) {
|
||||
Log.w(TAG, "Manual migration is not enabled! Skipping.");
|
||||
throw new InvalidMigrationStateException();
|
||||
}
|
||||
|
||||
List<Recipient> registeredMembers = RecipientUtil.getEligibleForSending(groupRecipient.getParticipants());
|
||||
|
||||
if (RecipientUtil.ensureUuidsAreAvailable(context, registeredMembers)) {
|
||||
|
|
|
@ -129,12 +129,10 @@ public class ManageGroupViewModel extends ViewModel {
|
|||
recipient -> {
|
||||
boolean showLegacyInfo = recipient.requireGroupId().isV1();
|
||||
|
||||
if (showLegacyInfo && FeatureFlags.groupsV1ManualMigration() && recipient.getParticipants().size() > FeatureFlags.groupLimits().getHardLimit()) {
|
||||
if (showLegacyInfo && recipient.getParticipants().size() > FeatureFlags.groupLimits().getHardLimit()) {
|
||||
return GroupInfoMessage.LEGACY_GROUP_TOO_LARGE;
|
||||
} else if (showLegacyInfo && FeatureFlags.groupsV1ManualMigration()) {
|
||||
return GroupInfoMessage.LEGACY_GROUP_UPGRADE;
|
||||
} else if (showLegacyInfo) {
|
||||
return GroupInfoMessage.LEGACY_GROUP_LEARN_MORE;
|
||||
return GroupInfoMessage.LEGACY_GROUP_UPGRADE;
|
||||
} else if (groupId.isMms()) {
|
||||
return GroupInfoMessage.MMS_WARNING;
|
||||
} else {
|
||||
|
|
|
@ -63,7 +63,6 @@ public final class FeatureFlags {
|
|||
public static final String DONATE_MEGAPHONE = "android.donate";
|
||||
private static final String VIEWED_RECEIPTS = "android.viewed.receipts";
|
||||
private static final String GROUP_CALLING = "android.groupsv2.calling.2";
|
||||
private static final String GV1_MANUAL_MIGRATE = "android.groupsV1Migration.manual";
|
||||
private static final String GV1_FORCED_MIGRATE = "android.groupsV1Migration.forced";
|
||||
private static final String GV1_MIGRATION_JOB = "android.groupsV1Migration.job";
|
||||
private static final String SEND_VIEWED_RECEIPTS = "android.sendViewedReceipts";
|
||||
|
@ -95,7 +94,6 @@ public final class FeatureFlags {
|
|||
DONATE_MEGAPHONE,
|
||||
VIEWED_RECEIPTS,
|
||||
GV1_MIGRATION_JOB,
|
||||
GV1_MANUAL_MIGRATE,
|
||||
GV1_FORCED_MIGRATE,
|
||||
GROUP_CALLING,
|
||||
SEND_VIEWED_RECEIPTS,
|
||||
|
@ -285,14 +283,9 @@ public final class FeatureFlags {
|
|||
return getBoolean(GV1_MIGRATION_JOB, false);
|
||||
}
|
||||
|
||||
/** Whether or not manual migration from GV1->GV2 is enabled. */
|
||||
public static boolean groupsV1ManualMigration() {
|
||||
return getBoolean(GV1_MANUAL_MIGRATE, false);
|
||||
}
|
||||
|
||||
/** Whether or not forced migration from GV1->GV2 is enabled. */
|
||||
public static boolean groupsV1ForcedMigration() {
|
||||
return getBoolean(GV1_FORCED_MIGRATE, false) && groupsV1ManualMigration();
|
||||
return getBoolean(GV1_FORCED_MIGRATE, false);
|
||||
}
|
||||
|
||||
/** Whether or not to send viewed receipts. */
|
||||
|
|
Loading…
Add table
Reference in a new issue