mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Refactor FeatureFlags.
This commit is contained in:
@@ -132,7 +132,7 @@ public final class Megaphones {
|
||||
return false;
|
||||
}
|
||||
|
||||
long expiringAt = device.lastActiveTimestamp + FeatureFlags.linkedDeviceLifespan();
|
||||
long expiringAt = device.lastActiveTimestamp + FeatureFlags.getLinkedDeviceLifespan();
|
||||
long expiringIn = Math.max(expiringAt - System.currentTimeMillis(), 0);
|
||||
|
||||
return expiringIn < TimeUnit.DAYS.toMillis(7) && expiringIn > 0;
|
||||
@@ -177,7 +177,7 @@ public final class Megaphones {
|
||||
throw new IllegalStateException("No linked device to show");
|
||||
}
|
||||
|
||||
long expiringAt = device.lastActiveTimestamp + FeatureFlags.linkedDeviceLifespan();
|
||||
long expiringAt = device.lastActiveTimestamp + FeatureFlags.getLinkedDeviceLifespan();
|
||||
long expiringIn = Math.max(expiringAt - System.currentTimeMillis(), 0);
|
||||
int expiringDays = (int) TimeUnit.MILLISECONDS.toDays(expiringIn);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ object RemoteMegaphoneRepository {
|
||||
private fun checkCondition(conditionalId: String): Boolean {
|
||||
return when (conditionalId) {
|
||||
"standard_donate" -> shouldShowDonateMegaphone()
|
||||
"internal_user" -> FeatureFlags.internalUser()
|
||||
"internal_user" -> FeatureFlags.internalUser
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user