Merge pull request #130 from Daplugg23

fix: resolve dropped friends list by properly handling chunked social…
This commit is contained in:
ᴋᴀʟᴀᴅɪɴ
2026-04-17 23:00:14 +05:30
committed by GitHub
3 changed files with 6 additions and 6 deletions

View File

@@ -229,7 +229,6 @@ class BridgeService : Service() {
pendingSocialSnapshotCallback?.let { callback ->
pendingSocialSnapshotCallback = null
callback(parsedFriends, parsedGroups)
return
}
remoteSideContext.database.replaceMessagingData(parsedFriends, parsedGroups)
remoteSideContext.database.receiveMessagingDataCallback(parsedFriends, parsedGroups)

View File

@@ -138,6 +138,11 @@ fun AppDatabase.replaceMessagingData(
} finally {
database.endTransaction()
}
// Notify with the full updated list from the DB
val allFriends = getFriends(descOrder = true)
val allGroups = getGroups()
receiveMessagingDataCallback(allFriends, allGroups)
}
}

View File

@@ -256,11 +256,7 @@ class AddFriendDialog(
)
}
if (context.bridgeService != null) {
context.bridgeService?.requestEphemeralSocialSnapshot(updateSnapshot)
} else {
context.database.receiveMessagingDataCallback = updateSnapshot
}
context.database.receiveMessagingDataCallback = updateSnapshot
context.requestSocialSnapshotRefresh()
coroutineScope.launch(Dispatchers.IO) {