mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: 修复NT接口缺失闪退
Signed-off-by: WhiteChi <whitechi73@outlook.com>
This commit is contained in:
parent
7ec4a95303
commit
617874fea1
@ -23,7 +23,7 @@ import kotlin.concurrent.timer
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
|
||||
abstract class BaseSvc {
|
||||
internal abstract class BaseSvc {
|
||||
companion object {
|
||||
val currentUin: String
|
||||
get() = app.currentAccountUin
|
||||
|
@ -27,8 +27,12 @@ import tencent.im.oidb.oidb_sso
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
internal object CardSvc: BaseSvc() {
|
||||
private val GetModelShowLock = Mutex()
|
||||
private val refreshCardLock = Mutex()
|
||||
private val GetModelShowLock by lazy {
|
||||
Mutex()
|
||||
}
|
||||
private val refreshCardLock by lazy {
|
||||
Mutex()
|
||||
}
|
||||
|
||||
suspend fun getModelShow(uin: Long = app.longAccountUin): String {
|
||||
return GetModelShowLock.withLock {
|
||||
|
@ -11,7 +11,6 @@ import tencent.im.oidb.cmd0x6d8.oidb_0x6d8
|
||||
import tencent.im.oidb.oidb_sso
|
||||
|
||||
internal object FileSvc: BaseSvc() {
|
||||
|
||||
fun createFileFolder(groupId: String, folderName: String) {
|
||||
sendOidb("OidbSvc.0x6d7_0", 1751, 0, protobufOf(
|
||||
1 to mapOf(
|
||||
|
@ -1,8 +1,10 @@
|
||||
@file:OptIn(DelicateCoroutinesApi::class)
|
||||
package moe.fuqiuluo.qqinterface.servlet
|
||||
|
||||
import com.tencent.mobileqq.data.Friends
|
||||
import com.tencent.mobileqq.friend.api.IFriendDataService
|
||||
import com.tencent.mobileqq.friend.api.IFriendHandlerService
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -38,8 +38,12 @@ import java.nio.ByteBuffer
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
internal object GroupSvc: BaseSvc() {
|
||||
private val RefreshTroopMemberInfoLock = Mutex()
|
||||
private val RefreshTroopMemberListLock = Mutex()
|
||||
private val RefreshTroopMemberInfoLock by lazy {
|
||||
Mutex()
|
||||
}
|
||||
private val RefreshTroopMemberListLock by lazy {
|
||||
Mutex()
|
||||
}
|
||||
|
||||
private lateinit var METHOD_REQ_MEMBER_INFO: Method
|
||||
private lateinit var METHOD_REQ_MEMBER_INFO_V2: Method
|
||||
|
@ -4,7 +4,6 @@ import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import moe.fuqiuluo.qqinterface.servlet.FriendSvc
|
||||
import moe.fuqiuluo.qqinterface.servlet.GroupSvc
|
||||
import moe.fuqiuluo.qqinterface.servlet.MsgSvc
|
||||
import moe.fuqiuluo.shamrock.xposed.helper.NTServiceFetcher
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
|
@ -73,8 +73,8 @@ internal object NTServiceFetcher {
|
||||
LogCenter.log("Register MSG listener successfully.")
|
||||
msgService.addMsgListener(AioListener)
|
||||
|
||||
groupService.addKernelGroupListener(GroupEventListener)
|
||||
LogCenter.log("Register Group listener successfully.")
|
||||
//groupService.addKernelGroupListener(GroupEventListener)
|
||||
//LogCenter.log("Register Group listener successfully.")
|
||||
|
||||
PrimitiveListener.registerListener()
|
||||
} catch (e: Throwable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user