mirror of
https://mirror.skon.top/github.com/gkd-kit/gkd
synced 2026-04-20 21:00:12 +08:00
refactor: loc
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -139,7 +139,6 @@ sealed class ActivityScene {
|
||||
data object TaskStack : ActivityScene()
|
||||
}
|
||||
|
||||
@Loc
|
||||
@Synchronized
|
||||
fun updateTopActivity(
|
||||
appId: String,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 = "",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -7,6 +7,7 @@ include(
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
google {
|
||||
content {
|
||||
@@ -22,6 +23,7 @@ pluginManagement {
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
google {
|
||||
content {
|
||||
|
||||
Reference in New Issue
Block a user