diff --git a/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt b/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt index 33cdecd..0fed8d4 100644 --- a/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt +++ b/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt @@ -57,7 +57,6 @@ class AppLoadImpl : IAppLoader { App246Fix3::class.java, App246Fix4::class.java, App246Fix5::class.java, - App250Fix::class.java, ) override fun onLoad(appParam: AppParam) { diff --git a/dynamic/src/main/java/xyz/fycz/dynamic/fix/App250Fix.kt b/dynamic/src/main/java/xyz/fycz/dynamic/fix/App250Fix.kt deleted file mode 100644 index 4798612..0000000 --- a/dynamic/src/main/java/xyz/fycz/dynamic/fix/App250Fix.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of FYReader. - * FYReader is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FYReader is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with FYReader. If not, see . - * - * Copyright (C) 2020 - 2022 fengyuecanzhu - */ - -package xyz.fycz.dynamic.fix - -import me.fycz.maple.MapleBridge -import me.fycz.maple.MapleUtils -import me.fycz.maple.MethodReplacement -import xyz.fycz.myreader.model.third3.analyzeRule.JsExtensions -import java.text.SimpleDateFormat -import java.util.* - -/** - * @author fengyue - * @date 2022/8/3 12:57 - */ -@AppFix([243, 244, 245, 246, 250], ["修复书源时间格式化bug"], "2022-08-03") -class App250Fix : AppFixHandle { - override fun onFix(key: String): BooleanArray { - return handleFix( - key, - "timeFormat" to { fixTimeFormat() }, - ) - } - - fun fixTimeFormat() { - MapleUtils.findAndHookMethod( - JsExtensions::class.java, - "timeFormat", - Long::class.java, - object : MethodReplacement() { - override fun replaceHookedMethod(param: MapleBridge.MethodHookParam): Any { - val time = param.args[0] as Long - return SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(Date(time)) - } - } - ) - } -} \ No newline at end of file