Tweaked some open group handling and a couple of onboarding issues

Updated the OpenGroup adding and polling logic to reduce duplicate API calls
Updated the BackgroundGroupAddJob to start a GroupAvatarDownloadJob instead of running the download itself (to appear to run faster)
Defaulted OpenGroups to use blinded auth when no server capabilities are present
Fixed an issue where the background poller could be started even though the onboarding hadn't been completed
Fixed an issue where the database could get into an invalid state if the app was restarted during onboarding
This commit is contained in:
Morgan Pretty
2023-01-09 15:22:29 +11:00
parent d0a4bac83e
commit 5afd647686
13 changed files with 89 additions and 55 deletions

View File

@@ -16,8 +16,10 @@ interface LokiAPIDatabaseProtocol {
fun setSwarm(publicKey: String, newValue: Set<Snode>)
fun getLastMessageHashValue(snode: Snode, publicKey: String, namespace: Int): String?
fun setLastMessageHashValue(snode: Snode, publicKey: String, newValue: String, namespace: Int)
fun clearAllLastMessageHashes()
fun getReceivedMessageHashValues(publicKey: String, namespace: Int): Set<String>?
fun setReceivedMessageHashValues(publicKey: String, newValue: Set<String>, namespace: Int)
fun clearReceivedMessageHashValues()
fun getAuthToken(server: String): String?
fun setAuthToken(server: String, newValue: String?)
fun setUserCount(room: String, server: String, newValue: Int)