mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:37:26 +00:00
Config update details and config syncing issue
This commit is contained in:
@@ -55,7 +55,7 @@ interface StorageProtocol {
|
||||
fun setProfilePicture(recipient: Recipient, newProfilePicture: String?, newProfileKey: ByteArray?)
|
||||
fun setBlocksCommunityMessageRequests(recipient: Recipient, blocksMessageRequests: Boolean)
|
||||
fun setUserProfilePicture(newProfilePicture: String?, newProfileKey: ByteArray?)
|
||||
fun clearUserPic()
|
||||
fun clearUserPic(clearConfig: Boolean = true)
|
||||
// Signal
|
||||
fun getOrGenerateRegistrationID(): Int
|
||||
|
||||
|
@@ -115,8 +115,8 @@ suspend fun ConfigFactoryProtocol.waitUntilUserConfigsPushed(timeoutMills: Long
|
||||
|
||||
return withTimeoutOrNull(timeoutMills){
|
||||
configUpdateNotifications
|
||||
.onStart { emit(ConfigUpdateNotification.UserConfigs) } // Trigger the filtering immediately
|
||||
.filter { it == ConfigUpdateNotification.UserConfigs && !needsPush() }
|
||||
.onStart { emit(ConfigUpdateNotification.UserConfigsModified) } // Trigger the filtering immediately
|
||||
.filter { it == ConfigUpdateNotification.UserConfigsModified && !needsPush() }
|
||||
.first()
|
||||
} != null
|
||||
}
|
||||
@@ -190,8 +190,10 @@ interface MutableGroupConfigs : GroupConfigs {
|
||||
fun rekey()
|
||||
}
|
||||
|
||||
|
||||
sealed interface ConfigUpdateNotification {
|
||||
data object UserConfigs : ConfigUpdateNotification
|
||||
data object UserConfigsModified : ConfigUpdateNotification
|
||||
data class UserConfigsMerged(val timestamp: Long) : ConfigUpdateNotification
|
||||
|
||||
data class GroupConfigsUpdated(val groupId: AccountId) : ConfigUpdateNotification
|
||||
data class GroupConfigsDeleted(val groupId: AccountId) : ConfigUpdateNotification
|
||||
}
|
||||
|
Reference in New Issue
Block a user