refactor: loc

This commit is contained in:
二刺螈
2026-04-13 18:19:32 +08:00
parent 7b841b83ad
commit fd24993c49
7 changed files with 3 additions and 8 deletions

View File

@@ -98,7 +98,6 @@ class MainViewModel : BaseViewModel(), OnSimpleLife {
private val backThrottleTimer = ThrottleTimer()
@Loc
fun popPage(@Loc loc: String = "") = runMainPost {
if (backThrottleTimer.expired() && backStack.size > 1) {
val old = backStack.last()
@@ -107,7 +106,6 @@ class MainViewModel : BaseViewModel(), OnSimpleLife {
}
}
@Loc
fun navigatePage(
navKey: NavKey,
replaced: Boolean = false,

View File

@@ -139,7 +139,6 @@ sealed class ActivityScene {
data object TaskStack : ActivityScene()
}
@Loc
@Synchronized
fun updateTopActivity(
appId: String,

View File

@@ -25,7 +25,6 @@ interface OnSimpleLife {
fun onDestroyed(f: CbFn) = cbs<CbFn>(2).add(f)
fun onDestroyed() = cbs<CbFn>(2).forEach { it() }
@Loc
fun useLogLifecycle(@Loc loc: String = "") {
onCreated { LogUtils.d("onCreated -> " + this::class.simpleName, loc = loc) }
onDestroyed { LogUtils.d("onDestroyed -> " + this::class.simpleName, loc = loc) }
@@ -50,7 +49,6 @@ interface OnSimpleLife {
onDestroyed { stateFlow.value = false }
}
@Loc
fun useAliveToast(
name: String,
delayMillis: Long = 0L,

View File

@@ -13,7 +13,6 @@ import java.util.concurrent.Executors
import kotlin.time.Duration.Companion.days
object LogUtils {
@Loc
fun d(
vararg args: Any?,
@Loc loc: String = "",

View File

@@ -31,7 +31,6 @@ import li.songe.gkd.store.actionCountFlow
import li.songe.gkd.store.storeFlow
import li.songe.loc.Loc
@Loc
fun toast(
text: CharSequence,
forced: Boolean = false,

View File

@@ -13,7 +13,7 @@ coil = "3.4.0"
telephoto = "0.19.0"
remap = "0.1.1"
shizuku = "13.1.5"
loc = "0.5.4"
loc = "0.6.2"
[libraries]
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }

View File

@@ -7,6 +7,7 @@ include(
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
google {
content {
@@ -22,6 +23,7 @@ pluginManagement {
dependencyResolutionManagement {
repositories {
mavenLocal()
mavenCentral()
google {
content {