提交 84431ceb 作者: enjoy

优化INIT

上级 2734777a
...@@ -12,7 +12,7 @@ import com.work.provide_tool.app.IApp.Companion.app ...@@ -12,7 +12,7 @@ import com.work.provide_tool.app.IApp.Companion.app
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext //import kotlinx.coroutines.withContext
fun getAppColor(id:Int): Int { fun getAppColor(id:Int): Int {
...@@ -82,24 +82,30 @@ private fun glideGeneralOption(url:Any?,iv:ImageView?,requestOptions:RequestOpti ...@@ -82,24 +82,30 @@ private fun glideGeneralOption(url:Any?,iv:ImageView?,requestOptions:RequestOpti
return return
} }
if(url is String){ when (url) {
url.run { is String -> {
if(isEmpty()){ url.run {
return if(isEmpty()){
} return
}
if(startsWith("https")){ if(startsWith("https")){
replace("https","http") replace("https","http")
}
} }
} }
}else if(url is Int){
url.run { is Int -> {
if(this == 0){ url.run {
return if(this == 0){
return
}
} }
} }
}else{
ToastUtil.show("glide load $url ??") else -> {
ToastUtil.show("glide load $url ??")
}
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论