Skip to content

Commit

Permalink
Fix stuck in 接收中
Browse files Browse the repository at this point in the history
  • Loading branch information
whitechi73 committed Jan 23, 2024
1 parent 7bdfc09 commit d6c4d53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/moe/fuqiuluo/entries/InfoSyncPush.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class InfoSyncPush(
@ProtoNumber(3) val type: Int = Int.MIN_VALUE,
@ProtoNumber(4) val pushId: Long = Long.MIN_VALUE,
@ProtoNumber(8) val syncContent: InfoSyncPushContent? = null,
)

@Serializable
data class InfoSyncPushContent(
@ProtoNumber(3) val head: SyncInfoHead? = null,
@ProtoNumber(4) val body: ArrayList<SyncInfoBody>? = null,

@ProtoNumber(5) val subHead: SyncInfoHead? = null,
)

@Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.tencent.qqnt.kernel.api.impl.MsgService
import de.robv.android.xposed.XposedBridge
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.decodeFromByteArray
import kotlinx.serialization.encodeToByteArray
import kotlinx.serialization.protobuf.ProtoBuf
import moe.fuqiuluo.entries.InfoSyncPush
import moe.fuqiuluo.entries.MessagePush
Expand Down Expand Up @@ -42,7 +43,9 @@ internal object NTServiceFetcher {
if (cmd == "trpc.msg.register_proxy.RegisterProxy.InfoSyncPush") {
val syncPush = ProtoBuf.decodeFromByteArray<InfoSyncPush>(buffer)
if (AioListener.onInfoSyncPush(syncPush)) {
it.result = Unit
it.result = ProtoBuf.encodeToByteArray(syncPush.copy(
syncContent = syncPush.syncContent?.copy(body = arrayListOf())
))
}
} else if (cmd == "trpc.msg.olpush.OlPushService.MsgPush") {
val msgPush = ProtoBuf.decodeFromByteArray<MessagePush>(buffer)
Expand Down

0 comments on commit d6c4d53

Please sign in to comment.