mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-04 17:55:30 +08:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c4de8ae448
|
|||
9e092742da
|
|||
fb27c107f4
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/fankes/TSBattery)
|
[](https://github.com/fankes/TSBattery)
|
||||||
[](https://github.com/fankes/TSBattery/blob/master/LICENSE)
|
[](https://github.com/fankes/TSBattery/blob/master/LICENSE)
|
||||||
[](https://github.com/fankes/TSBattery/releases)
|
[](https://github.com/fankes/TSBattery/releases)
|
||||||
[](https://github.com/fankes/TSBattery/releases)
|
[](https://github.com/fankes/TSBattery/releases)
|
||||||
[](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
|
[](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
|
||||||
[](https://t.me/XiaofangInternet)
|
[](https://t.me/XiaofangInternet)
|
||||||
|
@@ -134,6 +134,10 @@ class HookEntry : IYukiHookXposedInit {
|
|||||||
interceptBaseChatPie(methodName = "bl")
|
interceptBaseChatPie(methodName = "bl")
|
||||||
interceptBaseChatPie(methodName = "bm")
|
interceptBaseChatPie(methodName = "bm")
|
||||||
}
|
}
|
||||||
|
"8.8.93" -> {
|
||||||
|
interceptBaseChatPie(methodName = "J3")
|
||||||
|
interceptBaseChatPie(methodName = "S")
|
||||||
|
}
|
||||||
else -> loggerD(msg = "$version not supported!")
|
else -> loggerD(msg = "$version not supported!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
|
|
||||||
private const val moduleVersion = BuildConfig.VERSION_NAME
|
private const val moduleVersion = BuildConfig.VERSION_NAME
|
||||||
private const val qqSupportVersion =
|
private const val qqSupportVersion =
|
||||||
"8.2.11(Play)、8.8.17、8.8.23、8.8.35、8.8.38、8.8.50、8.8.55、8.8.68、8.8.80、8.8.83、8.8.85、8.8.88、8.8.90 (8.2.11、8.5.5~8.8.90)"
|
"8.2.11(Play)、8.8.17、8.8.23、8.8.35、8.8.38、8.8.50、8.8.55、8.8.68、8.8.80、8.8.83、8.8.85、8.8.88、8.8.90、8.8.93 (8.2.11、8.5.5~8.8.93)"
|
||||||
private const val timSupportVersion = "2+、3+ (并未完全测试每个版本)"
|
private const val timSupportVersion = "2+、3+ (并未完全测试每个版本)"
|
||||||
private const val wechatSupportVersion = "全版本仅支持基础省电,更多功能依然画饼"
|
private const val wechatSupportVersion = "全版本仅支持基础省电,更多功能依然画饼"
|
||||||
|
|
||||||
|
@@ -19,15 +19,21 @@
|
|||||||
*
|
*
|
||||||
* This file is Created by fankes on 2022/3/20.
|
* This file is Created by fankes on 2022/3/20.
|
||||||
*/
|
*/
|
||||||
|
@file:Suppress("NewApi")
|
||||||
|
|
||||||
package com.fankes.tsbattery.utils.tool
|
package com.fankes.tsbattery.utils.tool
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.icu.text.SimpleDateFormat
|
||||||
|
import android.icu.util.Calendar
|
||||||
|
import android.icu.util.TimeZone
|
||||||
import com.fankes.tsbattery.utils.factory.*
|
import com.fankes.tsbattery.utils.factory.*
|
||||||
import okhttp3.*
|
import okhttp3.*
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 Github Release 最新版本工具类
|
* 获取 Github Release 最新版本工具类
|
||||||
@@ -61,7 +67,7 @@ object GithubReleaseTool {
|
|||||||
name = getString("name"),
|
name = getString("name"),
|
||||||
htmlUrl = getString("html_url"),
|
htmlUrl = getString("html_url"),
|
||||||
content = getString("body"),
|
content = getString("body"),
|
||||||
date = getString("published_at").replace(oldValue = "T", newValue = " ").replace(oldValue = "Z", newValue = "")
|
date = getString("published_at").localTime()
|
||||||
).apply {
|
).apply {
|
||||||
fun showUpdate() = context.showDialog {
|
fun showUpdate() = context.showDialog {
|
||||||
title = "最新版本 $name"
|
title = "最新版本 $name"
|
||||||
@@ -111,6 +117,18 @@ object GithubReleaseTool {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化时间为本地时区
|
||||||
|
* @return [String] 本地时区时间
|
||||||
|
*/
|
||||||
|
private fun String.localTime() = replace(oldValue = "T", newValue = " ").replace(oldValue = "Z", newValue = "").let {
|
||||||
|
runCatching {
|
||||||
|
val local = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).apply { timeZone = Calendar.getInstance().timeZone }
|
||||||
|
val current = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ROOT).apply { timeZone = TimeZone.getTimeZone("GMT") }
|
||||||
|
local.format(current.parse(it))
|
||||||
|
}.getOrNull() ?: it
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Github Release bean
|
* Github Release bean
|
||||||
* @param name 版本名称
|
* @param name 版本名称
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
package com.fankes.tsbattery.utils.tool
|
package com.fankes.tsbattery.utils.tool
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import com.fankes.tsbattery.BuildConfig
|
||||||
import com.fankes.tsbattery.utils.factory.openBrowser
|
import com.fankes.tsbattery.utils.factory.openBrowser
|
||||||
import com.fankes.tsbattery.utils.factory.showDialog
|
import com.fankes.tsbattery.utils.factory.showDialog
|
||||||
import com.highcapable.yukihookapi.YukiHookAPI
|
import com.highcapable.yukihookapi.YukiHookAPI
|
||||||
@@ -34,7 +35,7 @@ import com.highcapable.yukihookapi.hook.xposed.prefs.data.PrefsData
|
|||||||
object YukiPromoteTool {
|
object YukiPromoteTool {
|
||||||
|
|
||||||
/** 推广已读存储键值 */
|
/** 推广已读存储键值 */
|
||||||
private val YUKI_PROMOTE_READED = PrefsData("yuki_promote_readed", false)
|
private val YUKI_PROMOTE_READED = PrefsData("yuki_promote_readed_${BuildConfig.VERSION_NAME}", false)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示推广对话框
|
* 显示推广对话框
|
||||||
|
@@ -5,8 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appVersionName = "3.95"
|
appVersionName = "3.96"
|
||||||
appVersionCode = 18
|
appVersionCode = 19
|
||||||
enableR8 = true
|
enableR8 = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user