perf(icon): 升级 iconloader 1.0.3 并避免重复创建图标加载任务
- 依赖升级到 com.ttstd:iconloader:1.0.3 - 列表图标缓存未命中时,仅在 Loader 不存在时重建,避免重复触发加载
This commit is contained in:
1 parent
b850d0e65b
commit
064af2f80f
4 files changed
+21
-18
No files matched your search
+12
-15
@@ -225,8 +225,6 @@ dependencies {
|
||||
//sherpa-onnx https://github.com/k2-fsa/sherpa-onnx/releases
|
||||
implementation files('libs/sherpa-onnx-2.0.1.aar')
|
||||
|
||||
implementation 'com.ttstd:iconloader:1.0.2'
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
||||
|
||||
// 添加 Kotlin 标准库
|
||||
@@ -308,7 +306,6 @@ dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.15.0'
|
||||
implementation 'com.google.zxing:core:3.5.4'
|
||||
|
||||
|
||||
implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
|
||||
/*https://github.com/JeremyLiao/LiveEventBus*/
|
||||
// implementation 'io.github.jeremyliao:live-event-bus:1.8.0'
|
||||
@@ -318,7 +315,6 @@ dependencies {
|
||||
implementation 'com.tencent:mmkv-static:2.4.3'
|
||||
//bugly
|
||||
implementation 'com.tencent.bugly:crashreport:4.1.9.7'
|
||||
implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.1.0'
|
||||
|
||||
// 替换成最新版本, 需要注意的是api
|
||||
// 要与compiler匹配使用,均使用最新版可以保证兼容
|
||||
@@ -357,7 +353,6 @@ dependencies {
|
||||
// 接入蔚来厂商
|
||||
implementation "cn.jiguang.sdk.plugin:nio:$jpush.version"
|
||||
|
||||
|
||||
//地图组件
|
||||
implementation 'com.baidu.lbsyun:BaiduMapSDK_Map:8.2.0.2'
|
||||
//基础定位组件
|
||||
@@ -371,15 +366,7 @@ dependencies {
|
||||
implementation 'com.github.hackware1993:MagicIndicator:1.7.0'
|
||||
//工具类
|
||||
implementation 'com.blankj:utilcodex:1.31.1'
|
||||
//aria
|
||||
implementation 'com.arialyy.aria:core:3.8.15'
|
||||
kapt 'com.arialyy.aria:compiler:3.8.15'
|
||||
//状态栏透明
|
||||
implementation 'com.zackratos.ultimatebarx:ultimatebarx:0.8.1'
|
||||
//以后替换为ShapeableImageView
|
||||
implementation 'com.shehuan:niceimageview:1.0.5'
|
||||
implementation 'com.opencsv:opencsv:5.12.0'
|
||||
|
||||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||||
implementation 'com.github.getActivity:XXPermissions:28.3'
|
||||
// implementation 'com.github.zcweng:switch-button:0.0.3@aar'
|
||||
@@ -387,6 +374,18 @@ dependencies {
|
||||
implementation 'cn.6tail:lunar:1.7.8'
|
||||
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.4.2"
|
||||
implementation 'io.github.youth5201314:banner:2.2.3'
|
||||
//阴影布局
|
||||
implementation 'com.github.lihangleo2:ShadowLayout:3.4.6'
|
||||
|
||||
//aria
|
||||
implementation 'com.arialyy.aria:core:3.8.15'
|
||||
kapt 'com.arialyy.aria:compiler:3.8.15'
|
||||
//状态栏透明
|
||||
implementation 'com.zackratos.ultimatebarx:ultimatebarx:0.8.1'
|
||||
//以后替换为ShapeableImageView
|
||||
implementation 'com.shehuan:niceimageview:1.0.5'
|
||||
implementation 'com.ttstd:iconloader:1.0.3'
|
||||
implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.1.0'
|
||||
|
||||
// TinyPinyin核心包,约80KB
|
||||
implementation 'com.github.promeg:tinypinyin:2.0.3'
|
||||
@@ -418,8 +417,6 @@ dependencies {
|
||||
implementation "com.github.gzu-liyujiang.AndroidPicker:CalendarPicker:$AndroidPicker.version"
|
||||
//图片选择器
|
||||
implementation "com.github.gzu-liyujiang.AndroidPicker:ImagePicker:$AndroidPicker.version"
|
||||
//阴影布局
|
||||
implementation 'com.github.lihangleo2:ShadowLayout:3.4.6'
|
||||
|
||||
// ---- WebRTC 远程控制(移植自 WebRTCControlled)----
|
||||
// WebRTC SDK(屏幕采集 + PeerConnection + DataChannel)
|
||||
|
||||
@@ -80,7 +80,9 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.AppHolder> imple
|
||||
if (drawable != null) {
|
||||
holder.iv_icon.setImageDrawable(drawable);
|
||||
} else {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
if (mLoaderManager.getLoader(position) == null) {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
}
|
||||
}
|
||||
holder.tv_app_name.setText(appInfo.getLabel());
|
||||
holder.root.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -94,7 +94,9 @@ public class AppGridAdapter extends RecyclerView.Adapter<AppGridAdapter.ViewHold
|
||||
if (drawable != null) {
|
||||
holder.iv_icon.setImageDrawable(drawable);
|
||||
} else {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
if (mLoaderManager.getLoader(position) == null) {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
}
|
||||
}
|
||||
holder.tv_app_name.setText(appInfo.getLabel());
|
||||
|
||||
|
||||
@@ -101,7 +101,9 @@ public class MoreAppAdapter extends RecyclerView.Adapter<MoreAppAdapter.AppHolde
|
||||
if (drawable != null) {
|
||||
holder.iv_icon.setImageDrawable(drawable);
|
||||
} else {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
if (mLoaderManager.getLoader(position) == null) {
|
||||
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||
}
|
||||
}
|
||||
holder.tv_app_name.setText(appInfo.getLabel());
|
||||
holder.root.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
Reference in new issue
Block a user