feat: partial scope content

This commit is contained in:
rhunk
2023-08-21 18:09:59 +02:00
parent 31570694a0
commit 16a16df51a
11 changed files with 234 additions and 57 deletions

View File

@ -6,12 +6,12 @@ interface SyncCallback {
* @param uuid The uuid of the friend to sync
* @return The serialized friend data
*/
String syncFriend(String uuid);
@nullable String syncFriend(String uuid);
/**
* Called when the conversation data has been synced
* @param uuid The uuid of the conversation to sync
* @return The serialized conversation data
*/
String syncGroup(String uuid);
@nullable String syncGroup(String uuid);
}

View File

@ -89,6 +89,7 @@ class SnapEnhance {
Logger.debug("Reloading config")
appContext.reloadConfig()
syncRemote()
}
}
@ -131,6 +132,7 @@ class SnapEnhance {
val database = appContext.database
appContext.executeAsync {
Logger.debug("request remote sync")
appContext.bridgeClient.sync(object : SyncCallback.Stub() {
override fun syncFriend(uuid: String): String? {
return database.getFriendInfo(uuid)?.toJson()

View File

@ -29,7 +29,7 @@ data class FriendStreaks(
val userId: String,
val notify: Boolean,
val expirationTimestamp: Long,
val count: Int
val length: Int
) : SerializableDataObject()