Skip to content

Commit b60e8a1

Browse files
committed
增加功能
1 parent f4c0020 commit b60e8a1

File tree

1 file changed

+0
-26
lines changed
  • module-communication-route/src/main/java/com/flyjingfish/module_communication_route

1 file changed

+0
-26
lines changed

module-communication-route/src/main/java/com/flyjingfish/module_communication_route/ModuleRoute.kt

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -106,32 +106,6 @@ object ModuleRoute {
106106
return intent.extras
107107
}
108108

109-
/**
110-
* 有相关路由页面才会返回 Intent 否则返回 null
111-
*/
112-
fun getIntent(context: Context): Intent? {
113-
val clazzInfo = getClassInfo()
114-
clazzInfo?.let {
115-
intent.setClass(context, it.pathInfo.clazz.java)
116-
if (context !is Activity) {
117-
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
118-
}
119-
}
120-
return if (clazzInfo != null) {
121-
intent
122-
} else null
123-
}
124-
125-
/**
126-
* 有相关路由页面才会返回 Intent 否则返回 null
127-
* 需要 [ModuleRoute].[setApplication] 来初始化 application.
128-
*/
129-
fun getIntent(): Intent? {
130-
val app = application
131-
?: throw IllegalArgumentException("请调用 ModuleRoute.setApplication 来初始化 application.")
132-
return getIntent(app as Context)
133-
}
134-
135109
/**
136110
* 跳转页面
137111
* @param context 上下文参数

0 commit comments

Comments
 (0)