Merge remote-tracking branch 'origin/dev' into dev-5.7.0
This commit is contained in:
@ -503,7 +503,16 @@ andResGuard {
|
||||
"R.drawable.concern_up",
|
||||
"R.drawable.ic_libao_more",
|
||||
"R.drawable.ic_libao_delete",
|
||||
"R.drawable.ic_dialog_close"
|
||||
"R.drawable.ic_dialog_close",
|
||||
"R.drawable.occupy2",
|
||||
"R.drawable.kc_checkbox_unselect",
|
||||
"R.drawable.kc_checkbox_select",
|
||||
"R.drawable.ic_type_unselect",
|
||||
"R.drawable.ic_type_selected",
|
||||
"R.drawable.suggest_add_pic_icon",
|
||||
"R.drawable.icon_pic_add",
|
||||
"R.drawable.ask_search_input_delete",
|
||||
"R.drawable.suggest_pic_delete"
|
||||
]
|
||||
compressFilePattern = [
|
||||
"*.png",
|
||||
|
||||
@ -13,7 +13,7 @@ object EnvHelper {
|
||||
|
||||
@JvmStatic
|
||||
fun getHost(): String {
|
||||
return if (PackageFlavorHelper.IS_TEST_FLAVOR) {
|
||||
return if (!PackageFlavorHelper.IS_TEST_FLAVOR) {
|
||||
BuildConfig.API_HOST
|
||||
} else {
|
||||
if (isDevEnv) {
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.gh.flutter;
|
||||
|
||||
import com.gh.common.constant.Config;
|
||||
|
||||
import me.ele.lancet.base.annotations.Insert;
|
||||
import me.ele.lancet.base.annotations.TargetClass;
|
||||
|
||||
public class FlutterConfigServiceImplAop {
|
||||
private static final String TARGET_CLASS = FlutterConstants.SERVICE_PACKAGE + ".FlutterConfigServiceImpl";
|
||||
private static final String METHOD_IS_SHOW_PLUGIN = "isShowPlugin";
|
||||
|
||||
@TargetClass(TARGET_CLASS)
|
||||
@Insert(METHOD_IS_SHOW_PLUGIN)
|
||||
public boolean isShowPlugin(String id) {
|
||||
return Config.isShowPlugin(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.gh.flutter;
|
||||
|
||||
import com.gh.common.filter.RegionSettingHelper;
|
||||
|
||||
import me.ele.lancet.base.annotations.Insert;
|
||||
import me.ele.lancet.base.annotations.TargetClass;
|
||||
|
||||
public class FlutterRegionSettingServiceImplAop {
|
||||
private static final String TARGET_CLASS =
|
||||
FlutterConstants.SERVICE_PACKAGE + ".FlutterRegionSettingServiceImpl";
|
||||
private static final String METHOD_SHOULD_THIS_GAME_DISPLAY_MIRROR_INFO = "shouldThisGameDisplayMirrorInfo";
|
||||
|
||||
@TargetClass(TARGET_CLASS)
|
||||
@Insert(METHOD_SHOULD_THIS_GAME_DISPLAY_MIRROR_INFO)
|
||||
public boolean shouldThisGameDisplayMirrorInfo(String gameId) {
|
||||
return RegionSettingHelper.INSTANCE.shouldThisGameDisplayMirrorInfo(gameId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.gh.flutter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import me.ele.lancet.base.annotations.Insert;
|
||||
import me.ele.lancet.base.annotations.TargetClass;
|
||||
|
||||
public class FlutterSharedPreferencesServiceImplAop {
|
||||
private static final String TARGET_CLASS = FlutterConstants.SERVICE_PACKAGE + ".FlutterSharedPreferencesServiceImpl";
|
||||
private static final String METHOD_GET_STRING = "getString";
|
||||
|
||||
@TargetClass(TARGET_CLASS)
|
||||
@Insert(METHOD_GET_STRING)
|
||||
public String getString(Context context, String key, String defaultValue) {
|
||||
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return pref.getString(key, defaultValue);
|
||||
}
|
||||
}
|
||||
@ -362,6 +362,12 @@ public class DetailViewHolder {
|
||||
} else {
|
||||
method = mViewHolder.context.getString(R.string.download);
|
||||
}
|
||||
|
||||
if (mGameEntity.getApk().size() == 0) {
|
||||
Utils.toast(mViewHolder.context, "暂时无法下载,请稍后再试");
|
||||
return;
|
||||
}
|
||||
|
||||
ApkEntity apkEntity = mGameEntity.getApk().get(0);
|
||||
String msg = FileUtils.isCanDownload(mViewHolder.context, apkEntity.getSize());
|
||||
if (TextUtils.isEmpty(msg)) {
|
||||
|
||||
@ -7,7 +7,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.util.safelyGetInRelease
|
||||
import com.lightgame.adapter.BaseRecyclerAdapter
|
||||
|
||||
abstract class DiffUtilAdapter<DataType>(context: Context) : BaseRecyclerAdapter<RecyclerView.ViewHolder>(context) {
|
||||
abstract class DiffUtilAdapter<DataType>(context: Context) :
|
||||
BaseRecyclerAdapter<RecyclerView.ViewHolder>(context) {
|
||||
|
||||
protected var mDataList = ArrayList<DataType>()
|
||||
|
||||
@ -40,15 +41,22 @@ abstract class DiffUtilAdapter<DataType>(context: Context) : BaseRecyclerAdapter
|
||||
}
|
||||
|
||||
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
if (oldItemPosition >= mDataList.size) return false
|
||||
if (newItemPosition >= updateDataCopy.size) return false
|
||||
if (oldItemPosition != newItemPosition
|
||||
|| oldItemPosition >= mDataList.size
|
||||
|| newItemPosition >= updateDataCopy.size
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
val oldItem = mDataList.safelyGetInRelease(oldItemPosition)
|
||||
val newItem = updateDataCopy.safelyGetInRelease(newItemPosition)
|
||||
return areItemsTheSame(oldItem, newItem)
|
||||
}
|
||||
|
||||
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
override fun areContentsTheSame(
|
||||
oldItemPosition: Int,
|
||||
newItemPosition: Int
|
||||
): Boolean {
|
||||
if (oldItemPosition >= mDataList.size) return false
|
||||
if (newItemPosition >= updateDataCopy.size) return false
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ class RankCollectionAdapter(
|
||||
notifyDataSetChanged()
|
||||
} else {
|
||||
mViewHolderList.forEach { position, viewHolder ->
|
||||
viewHolder.checkResetData(updateDate.columns[position])
|
||||
viewHolder.checkResetData(updateDate.columns.safelyGetInRelease(position))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ class WebFragment : LazyFragment(), IScrollable {
|
||||
if (isAdded) {
|
||||
val uri = Uri.parse(url)
|
||||
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||
startActivity(intent)
|
||||
tryWithDefaultCatch { startActivity(intent) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Submodule assistant_flutter updated: 51c87bef31...31d27bb502
Reference in New Issue
Block a user