mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 05:07:46 +02:00
feat: partial scope content
This commit is contained in:
@ -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);
|
||||
}
|
@ -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()
|
||||
|
@ -29,7 +29,7 @@ data class FriendStreaks(
|
||||
val userId: String,
|
||||
val notify: Boolean,
|
||||
val expirationTimestamp: Long,
|
||||
val count: Int
|
||||
val length: Int
|
||||
) : SerializableDataObject()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user