Merge code

This commit is contained in:
2022-03-17 05:14:10 +08:00
parent 3816aab335
commit 0be6b9c910
5 changed files with 10 additions and 9 deletions

2
.idea/misc.xml generated
View File

@@ -25,7 +25,7 @@
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@@ -2,7 +2,7 @@
![Eclipse Marketplace](https://img.shields.io/badge/build-passing-brightgreen)
![Eclipse Marketplace](https://img.shields.io/badge/license-AGPL3.0-blue)
![Eclipse Marketplace](https://img.shields.io/badge/version-v1.95-green)
![Eclipse Marketplace](https://img.shields.io/badge/version-v2.0-green)
<br/><br/>
<img src="https://github.com/fankes/MIUINativeNotifyIcon/blob/master/app/src/main/ic_launcher-playstore.png" width = "100" height = "100"/>
<br/>
@@ -12,7 +12,7 @@ Fix the native notification bar icon function abandoned by the MIUI development
# 开始使用
点击下载最新版本
<a href='https://github.com/fankes/MIUINativeNotifyIcon/releases'>![Eclipse Marketplace](https://img.shields.io/badge/download-v1.95-green)</a>
<a href='https://github.com/fankes/MIUINativeNotifyIcon/releases'>![Eclipse Marketplace](https://img.shields.io/badge/download-v2.0-green)</a>
<br/><br/>
⚠️ 适配说明<br/>

View File

@@ -30,7 +30,7 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}

View File

@@ -125,7 +125,7 @@ class MainActivity : BaseActivity() {
val notifyIconFixButton = findViewById<View>(R.id.config_notify_app_button)
/** 获取 Sp 存储的信息 */
val statusBarIconCount = modulePrefs.getInt(HOOK_STATUS_ICON_COUNT, default = 5)
var statusBarIconCount = modulePrefs.getInt(HOOK_STATUS_ICON_COUNT, default = 5)
colorIconHookItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
statusIconCountItem.isVisible = modulePrefs.getBoolean(ENABLE_MODULE, default = true)
colorIconCompatSwitch.isVisible = modulePrefs.getBoolean(ENABLE_COLOR_ICON_HOOK, default = true)
@@ -210,8 +210,9 @@ class MainActivity : BaseActivity() {
(runCatching { editText.text.toString().toInt() }.getOrNull() ?: -1)
!in 0..100 -> snake(msg = "请输入有效数值")
editText.text.toString().isNotBlank() -> runCatching {
modulePrefs.putInt(HOOK_STATUS_ICON_COUNT, editText.text.toString().trim().toInt())
statusIconCountText.text = editText.text.toString().trim()
statusBarIconCount = editText.text.toString().trim().toInt()
modulePrefs.putInt(HOOK_STATUS_ICON_COUNT, statusBarIconCount)
statusIconCountText.text = statusBarIconCount.toString()
SystemUITool.showNeedRestartSnake(context = this@MainActivity)
}.onFailure { snake(msg = "数值格式无效") }
else -> snake(msg = "请输入有效数值")

View File

@@ -5,8 +5,8 @@ plugins {
}
ext {
appVersionName = "1.95"
appVersionCode = 22
appVersionName = "2.0"
appVersionCode = 23
}
task clean(type: Delete) {