瀏覽代碼

提高函数废弃等级

drake 3 年之前
父節點
當前提交
76fd694c8b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      net/src/main/java/com/drake/net/utils/FlowUtils.kt

+ 2 - 2
net/src/main/java/com/drake/net/utils/FlowUtils.kt

@@ -32,7 +32,7 @@ import kotlinx.coroutines.flow.debounce
 /**
  * 收集Flow结果并过滤重复结果
  */
-@Deprecated("规范命名", ReplaceWith("launchIn"), DeprecationLevel.WARNING)
+@Deprecated("规范命名", ReplaceWith("launchIn(owner,event,dispatcher,action)"), DeprecationLevel.ERROR)
 @OptIn(InternalCoroutinesApi::class)
 inline fun <T> Flow<T>.listen(
     owner: LifecycleOwner? = null,
@@ -51,7 +51,7 @@ inline fun <T> Flow<T>.listen(
  * @param event 销毁时机
  * @param dispatcher 指定调度器
  */
-@Deprecated("规范命名", ReplaceWith("launchIn"), DeprecationLevel.WARNING)
+@Deprecated("规范命名", ReplaceWith("launchIn(owner,event,dispatcher,action)"), DeprecationLevel.ERROR)
 @OptIn(InternalCoroutinesApi::class)
 inline fun <T> Flow<T>.scope(
     owner: LifecycleOwner? = null,