fix: add legacy config subscription to the home activity to enable showing banner at any time

This commit is contained in:
0x330a
2023-04-24 12:03:07 +10:00
parent cd13da647c
commit c777c05456
2 changed files with 15 additions and 1 deletions

View File

@@ -638,6 +638,7 @@ interface TextSecurePreferences {
@JvmStatic
fun setHasLegacyConfig(context: Context, newValue: Boolean) {
setBooleanPreference(context, HAS_RECEIVED_LEGACY_CONFIG, newValue)
_events.tryEmit(HAS_RECEIVED_LEGACY_CONFIG)
}
fun setLocalNumber(context: Context, localNumber: String) {
@@ -1299,7 +1300,8 @@ class AppTextSecurePreferences @Inject constructor(
}
override fun setHasLegacyConfig(newValue: Boolean) {
return setBooleanPreference(TextSecurePreferences.HAS_RECEIVED_LEGACY_CONFIG, newValue)
setBooleanPreference(TextSecurePreferences.HAS_RECEIVED_LEGACY_CONFIG, newValue)
TextSecurePreferences._events.tryEmit(TextSecurePreferences.HAS_RECEIVED_LEGACY_CONFIG)
}
override fun setLocalNumber(localNumber: String) {