mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf: some code
This commit is contained in:
parent
c3d0084559
commit
7d3618149b
|
@ -3,8 +3,6 @@ package li.songe.gkd.service
|
|||
import android.accessibilityservice.AccessibilityService
|
||||
import android.graphics.Rect
|
||||
import android.view.accessibility.AccessibilityNodeInfo
|
||||
import li.songe.gkd.util.storeFlow
|
||||
import li.songe.gkd.util.toast
|
||||
import li.songe.selector.Selector
|
||||
import li.songe.selector.Transform
|
||||
|
||||
|
@ -217,16 +215,5 @@ val abTransform = Transform(
|
|||
}
|
||||
} while (stack.isNotEmpty())
|
||||
}.take(MAX_DESCENDANTS_SIZE)
|
||||
})
|
||||
|
||||
private var lastToastTime = -1L
|
||||
fun toastClickTip() {
|
||||
if (storeFlow.value.toastWhenClick) {
|
||||
val t = System.currentTimeMillis()
|
||||
if (t - lastToastTime > 3000) {
|
||||
toast(storeFlow.value.clickToast)
|
||||
lastToastTime = t
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
|
|
|
@ -201,7 +201,9 @@ class GkdAbService : CompositionAbService({
|
|||
newQueryTask()
|
||||
}
|
||||
}
|
||||
toastClickTip()
|
||||
if (storeFlow.value.toastWhenClick) {
|
||||
toast(storeFlow.value.clickToast)
|
||||
}
|
||||
insertClickLog(rule)
|
||||
LogUtils.d(
|
||||
rule.statusText(),
|
||||
|
@ -521,7 +523,7 @@ class GkdAbService : CompositionAbService({
|
|||
}
|
||||
val targetNode =
|
||||
serviceVal.safeActiveWindow?.querySelector(selector, gkdAction.quickFind)
|
||||
?: throw RpcError("没有选择到节点")
|
||||
?: throw RpcError("没有查询到节点")
|
||||
|
||||
if (gkdAction.action == null) {
|
||||
// 仅查询
|
||||
|
|
|
@ -129,7 +129,12 @@ fun AppItemPage(
|
|||
} else {
|
||||
"${subsRaw.name}/${appInfoCache[appRaw?.id]?.name ?: appRaw?.name ?: appRaw?.id}"
|
||||
}
|
||||
Text(text = text)
|
||||
Text(
|
||||
text = text,
|
||||
maxLines = 1,
|
||||
softWrap = false,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
}, actions = {})
|
||||
}, floatingActionButton = {
|
||||
if (editable) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package li.songe.gkd.ui.home
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.webkit.URLUtil
|
||||
|
@ -79,7 +78,6 @@ val subsNav = BottomNavItem(
|
|||
label = "订阅", icon = Icons.AutoMirrored.Filled.FormatListBulleted
|
||||
)
|
||||
|
||||
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
|
||||
@Composable
|
||||
fun useSubsManagePage(): ScaffoldExt {
|
||||
val context = LocalContext.current
|
||||
|
|
Loading…
Reference in New Issue
Block a user