提交 84431ceb 作者: enjoy

优化INIT

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