Inline the send member labels feature flag.

This commit is contained in:
jeffrey-signal
2026-03-12 11:06:31 -04:00
committed by Michelle Tang
parent dba5252be6
commit a5e00c4319
5 changed files with 25 additions and 65 deletions

View File

@@ -11,7 +11,6 @@ import org.signal.core.util.gibiBytes
import org.signal.core.util.kibiBytes
import org.signal.core.util.logging.Log
import org.signal.core.util.mebiBytes
import org.thoughtcrime.securesms.BuildConfig
import org.thoughtcrime.securesms.dependencies.AppDependencies
import org.thoughtcrime.securesms.groups.SelectionLimits
import org.thoughtcrime.securesms.jobs.RemoteConfigRefreshJob
@@ -522,24 +521,6 @@ object RemoteConfig {
)
}
/**
* A config that evaluates to true when the app's version is >= the semantic version string (e.g. "8.2.0") stored in the remote config value.
*
* Returns false if the remote value is absent, empty, or unparseable.
*/
@Suppress("SameParameterValue")
private fun remoteMinVersion(
key: String
): Config<Boolean> = remoteValue(
key = key,
hotSwappable = true,
transformer = { value ->
val minVersion = SemanticVersion.parse(value.asString(null))
val appVersion = SemanticVersion.parse(BuildConfig.VERSION_NAME.substringBefore("-"))
minVersion != null && appVersion != null && appVersion >= minVersion
}
)
private fun <T> remoteValue(
key: String,
hotSwappable: Boolean,
@@ -1278,15 +1259,6 @@ object RemoteConfig {
hotSwappable = true
)
/**
* Whether to enable modifying group member labels.
*/
@JvmStatic
@get:JvmName("sendMemberLabels")
val sendMemberLabels: Boolean by remoteMinVersion(
key = "android.sendMemberLabels.4"
)
/**
* Whether or not to receive admin delete messages.
*/