Merge branch 'dev' into feature-night_mode_test
This commit is contained in:
@ -214,6 +214,7 @@ dependencies {
|
||||
debugImplementation "com.squareup.okhttp3:logging-interceptor:${okHttp}"
|
||||
// debugImplementation "com.gu.android:toolargetool:${toolargetool}" // 需要使用调试时才启用
|
||||
debugImplementation "com.github.nichbar:WhatTheStack:${whatTheStack}"
|
||||
debugImplementation "io.github.didi.dokit:dokitx:${dokit}"
|
||||
|
||||
implementation "androidx.core:core-ktx:${core}"
|
||||
implementation "androidx.fragment:fragment-ktx:${fragment}"
|
||||
@ -342,7 +343,7 @@ dependencies {
|
||||
|
||||
implementation "com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl:${splitties}"
|
||||
|
||||
compileOnly "com.github.axen1314.lancet:lancet-base:$lancet_version"
|
||||
compileOnly "com.github.axen1314.lancet:lancet-base:${lancet_version}"
|
||||
|
||||
implementation project(':libraries:LGLibrary')
|
||||
implementation project(':libraries:QQShare')
|
||||
|
||||
@ -147,6 +147,9 @@
|
||||
### emoji4j
|
||||
-keep class emoji4j.* {*;}
|
||||
|
||||
### dokit
|
||||
-keep class com.didichuxing.* {*;}
|
||||
|
||||
# Flutter模块
|
||||
-keep class com.gh.common.util.DirectUtils {
|
||||
public static void directToQa(...);
|
||||
|
||||
@ -46,6 +46,7 @@ import com.gh.common.util.RunningUtils;
|
||||
import com.gh.common.util.SPUtils;
|
||||
import com.gh.common.util.ShareUtils;
|
||||
import com.gh.common.util.StringUtils;
|
||||
import com.gh.common.util.ToastUtils;
|
||||
import com.gh.download.DownloadManager;
|
||||
import com.gh.gamecenter.BuildConfig;
|
||||
import com.gh.gamecenter.LoginActivity;
|
||||
@ -253,6 +254,12 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Easy
|
||||
EntranceUtils.saveShortcut(this.getClass().getName(), getIntent().getExtras());
|
||||
return true;
|
||||
});
|
||||
} else {
|
||||
tv.setOnLongClickListener(v -> {
|
||||
SPUtils.setBoolean("dokit_enabled", true);
|
||||
ToastUtils.toast("重启应用后即可启用辅助工具");
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
screenRootView.addView(view);
|
||||
|
||||
@ -175,8 +175,6 @@ object DownloadObserver {
|
||||
} else {
|
||||
statDoneEvent(downloadEntity)
|
||||
|
||||
GameActivityDownloadHelper.postTaskComplete(downloadEntity.gameId)
|
||||
|
||||
EnergyTaskHelper.postEnergyTask(
|
||||
"download_game",
|
||||
downloadEntity.gameId,
|
||||
|
||||
@ -70,7 +70,6 @@ object ReservationHelper {
|
||||
|
||||
override fun onSuccess(data: ResponseBody) {
|
||||
ReservationRepository.addReservationToMemoryAndRefresh(gameId)
|
||||
GameActivityDownloadHelper.postTaskComplete(gameId)
|
||||
callback.onCallback()
|
||||
val wechatConfig = SPUtils.getString(Constants.SP_WECHAT_CONFIG).toObject<WechatConfigEntity>()
|
||||
wechatConfig?.run {
|
||||
|
||||
@ -39,7 +39,7 @@ class SubjectRowsFragment : BaseFragment<Any>() {
|
||||
override fun initView(view: View) {
|
||||
super.initView(view)
|
||||
mSettingEntity = arguments?.getParcelable(SubjectSettingEntity::class.java.simpleName)
|
||||
?: return
|
||||
?: return
|
||||
mSubjectData = arguments?.getParcelable(EntranceUtils.KEY_SUBJECT_DATA) ?: return
|
||||
|
||||
val labels = mSettingEntity.typeEntity.labels
|
||||
@ -53,9 +53,10 @@ class SubjectRowsFragment : BaseFragment<Any>() {
|
||||
createFilterLayout()
|
||||
|
||||
mListFragment = childFragmentManager.findFragmentByTag(SubjectListFragment::class.java.simpleName) as? SubjectListFragment
|
||||
?: SubjectListFragment()
|
||||
?: SubjectListFragment()
|
||||
mListFragment.arguments = arguments
|
||||
childFragmentManager.beginTransaction().replace(R.id.rows_list_container, mListFragment, SubjectListFragment::class.java.simpleName).commitAllowingStateLoss()
|
||||
childFragmentManager.beginTransaction().replace(R.id.rows_list_container, mListFragment, SubjectListFragment::class.java.simpleName)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
@ -118,9 +119,10 @@ class SubjectRowsFragment : BaseFragment<Any>() {
|
||||
}
|
||||
|
||||
// 隐藏相关选项
|
||||
filterView.recommendedTv.goneIf(mSettingEntity.filterOptions.isEmpty())
|
||||
filterView.newestTv.goneIf(mSettingEntity.filterOptions.size <= 1)
|
||||
filterView.ratingTv.goneIf(mSettingEntity.filterOptions.size <= 2)
|
||||
filterView.updateTv.goneIf(mSettingEntity.filterOptions.isEmpty())
|
||||
filterView.recommendedTv.goneIf(mSettingEntity.filterOptions.size <= 1)
|
||||
filterView.newestTv.goneIf(mSettingEntity.filterOptions.size <= 2)
|
||||
filterView.ratingTv.goneIf(mSettingEntity.filterOptions.size <= 3)
|
||||
filterView.sizeFilterArray = mSettingEntity.filterSizes
|
||||
|
||||
mLabelsContainer.addView(filterView)
|
||||
@ -154,13 +156,17 @@ class SubjectRowsFragment : BaseFragment<Any>() {
|
||||
else -> filterView.recommendedTv
|
||||
}
|
||||
|
||||
when (clickTv.text) {
|
||||
"更新" -> mSubjectData.sort = UrlFilterUtils.getFilterQuery("update_time", "-1")
|
||||
"最新" -> mSubjectData.sort = UrlFilterUtils.getFilterQuery("publish", "-1")
|
||||
"评分" -> mSubjectData.sort = UrlFilterUtils.getFilterQuery("star", "-1")
|
||||
else -> mSubjectData.sort = UrlFilterUtils.getFilterQuery("position", "1")
|
||||
val sort = when (clickTv.text) {
|
||||
"更新" -> UrlFilterUtils.getFilterQuery("update_time", "-1")
|
||||
"最新" -> UrlFilterUtils.getFilterQuery("publish", "-1")
|
||||
"评分" -> UrlFilterUtils.getFilterQuery("star", "-1")
|
||||
else -> UrlFilterUtils.getFilterQuery("position", "1")
|
||||
}
|
||||
|
||||
if (mSubjectData.sort != sort) {
|
||||
mSubjectData.sort = sort
|
||||
updateListFragment()
|
||||
}
|
||||
updateListFragment()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -213,6 +213,19 @@ public class HaloApp extends MultiDexApplication implements Configuration.Provid
|
||||
StrictMode.setVmPolicy(policy);
|
||||
}
|
||||
|
||||
// debug 包和 jenkins 内部包启用 dokit
|
||||
if (PackageFlavorHelper.IS_TEST_FLAVOR) {
|
||||
if (BuildConfig.DEBUG || SPUtils.getBoolean("dokit_enabled")) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName("com.didichuxing.doraemonkit.DoraemonKit");
|
||||
Method method = clazz.getMethod("install", Application.class);
|
||||
method.invoke(null, this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerActivityLifecycleCallbacks(new GlobalActivityLifecycleObserver());
|
||||
NightModeUtils.INSTANCE.initNightMode();
|
||||
}
|
||||
|
||||
@ -115,6 +115,7 @@ ext {
|
||||
splitties = "3.0.0"
|
||||
apksig = "1.0.0"
|
||||
gid = "1.3.0"
|
||||
dokit = "3.5.0"
|
||||
|
||||
sentry = "4.3.0"
|
||||
|
||||
|
||||
@ -23,6 +23,11 @@ cd ..
|
||||
#sed -i "s/TINKER_ENABLE\=\(.*\)/TINKER_ENABLE\=1/g" gradle.properties
|
||||
sed -i 's/buildConfigField "long", "BUILD_TIME", "0"/buildConfigField "long", "BUILD_TIME", '"\"${build_time_without_divider}\""'/g' app/build.gradle
|
||||
|
||||
### jenkins 包添加 dokit 供设计师查看颜色啥的
|
||||
sed -i '/debugImplementation "io.github.didi.dokit:dokitx:${dokit}"/c\ implementation "io.github.didi.dokit:dokitx:${dokit}"' app/build.gradle
|
||||
### dokit 自带 okhttp 会破坏正式包的字节码修改
|
||||
sed -i '/project.apply plugin: "com.gh.gamecenter.plugin"/c\ ' init.gradle
|
||||
|
||||
./gradlew rIR -I init.gradle
|
||||
if [ ! -f app/build/outputs/apk/internal/release/app-internal-release.apk ]; then
|
||||
./gradlew rIR -I init.gradle
|
||||
|
||||
@ -22,6 +22,11 @@ else
|
||||
sed -i '11 a evaluate(new File(settingsDir, "assistant_flutter/.android/include_flutter.groovy"))' settings.gradle
|
||||
fi
|
||||
|
||||
### jenkins 包添加 dokit 供设计师查看颜色啥的
|
||||
sed -i '/debugImplementation "io.github.didi.dokit:dokitx:${dokit}"/c\ implementation "io.github.didi.dokit:dokitx:${dokit}"' app/build.gradle
|
||||
### dokit 自带 okhttp 会破坏正式包的字节码修改
|
||||
sed -i '/project.apply plugin: "com.gh.gamecenter.plugin"/c\ ' init.gradle
|
||||
|
||||
cd assistant_flutter
|
||||
|
||||
flutter pub get
|
||||
|
||||
Reference in New Issue
Block a user