From 1026de5b59e997bf3b25262502110e8f3d9381dd Mon Sep 17 00:00:00 2001 From: aj3423 Date: Sun, 22 Sep 2024 15:52:25 +0800 Subject: [PATCH] v2.1 ready --- app/build.gradle.kts | 4 ++-- .../main/java/spam/blocker/ui/setting/regex/RuleSearchBox.kt | 4 +++- metadata/en-US/changelogs/201.txt | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 metadata/en-US/changelogs/201.txt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c1314e97..bcb9ee58 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -32,8 +32,8 @@ android { applicationId = "spam.blocker" minSdk = 29 targetSdk = 35 - versionCode = 200 - versionName = "2.0" + versionCode = 201 + versionName = "2.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/spam/blocker/ui/setting/regex/RuleSearchBox.kt b/app/src/main/java/spam/blocker/ui/setting/regex/RuleSearchBox.kt index 60494e9d..1efe3ba5 100644 --- a/app/src/main/java/spam/blocker/ui/setting/regex/RuleSearchBox.kt +++ b/app/src/main/java/spam/blocker/ui/setting/regex/RuleSearchBox.kt @@ -40,8 +40,8 @@ fun RuleSearchBox( vm.filter = it vm.reload(ctx) }, - // Auto focus, and force scroll to input box. modifier = M + // Auto focus, and force scroll to input box. .focusRequester(focusRequester) .onGloballyPositioned { if (!textFieldLoaded) { @@ -49,6 +49,8 @@ fun RuleSearchBox( textFieldLoaded = true // stop cyclic recompositions } } + + // Hide itself when lose focus, the unfocused event is triggered in SettingScreen .onFocusEvent { focusState -> if (textFieldLoaded && !focusState.isFocused) { vm.searchEnabled.value = false diff --git a/metadata/en-US/changelogs/201.txt b/metadata/en-US/changelogs/201.txt new file mode 100644 index 00000000..f6c01ad4 --- /dev/null +++ b/metadata/en-US/changelogs/201.txt @@ -0,0 +1,5 @@ +New: + - Option to disable history logging, or auto expire + - Rule schedule now supports two-day time spans, like 21:00-05:00 + - "Search Rule" context menu item + - Language support: Galician (gal) \ No newline at end of file