feat: adding a force new configs flag and logic for timestamp handling / forced configs, fix issue with handling legacy messages

This commit is contained in:
0x330a
2023-05-22 14:59:03 +10:00
parent 371fb20b6e
commit 9c206bad64
10 changed files with 59 additions and 27 deletions

View File

@@ -25,7 +25,11 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
is UserGroupsConfig -> Kind.GROUPS
}
const val isNewConfigEnabled = true
// TODO: time in future to activate (hardcoded to 1st jan 2024 for testing, change before release)
private const val ACTIVATE_TIME = 1704027600
fun isNewConfigEnabled(forced: Boolean, currentTime: Long) =
forced || currentTime >= ACTIVATE_TIME
const val PRIORITY_HIDDEN = -1
const val PRIORITY_VISIBLE = 0