Skip to content

Commit ba8e2f1

Browse files
committed
fix
1 parent 0251ec7 commit ba8e2f1

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

app/src/main/java/io/nekohasekai/sagernet/ui/LogcatFragment.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,7 @@ class LogcatFragment : ToolbarFragment(R.layout.layout_logcat),
7575
offset += line.length + 1
7676
}
7777
binding.textview.text = span
78-
79-
// 阻止自动滚动/焦点干扰
80-
binding.scroolview.descendantFocusability = ViewGroup.FOCUS_BLOCK_DESCENDANTS
81-
binding.textview.isFocusable = false
82-
binding.textview.isFocusableInTouchMode = false
8378
binding.textview.clearFocus()
84-
8579
// 等 textview 完成最终 layout 再滚动到底部
8680
binding.textview.doOnLayout {
8781
binding.scroolview.scrollTo(0, binding.textview.height)

app/src/main/java/io/nekohasekai/sagernet/ui/profile/ConfigEditActivity.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ class ConfigEditActivity : ThemedActivity() {
8686
}
8787

8888
binding.actionTab.setOnClickListener {
89-
binding.editor.insert(binding.editor.tab())
89+
try {
90+
binding.editor.insert(binding.editor.tab())
91+
} catch (e: Exception) {
92+
}
9093
}
9194
binding.actionUndo.setOnClickListener {
9295
try {
@@ -107,7 +110,12 @@ class ConfigEditActivity : ThemedActivity() {
107110
}
108111

109112
val extendedKeyboard = findViewById<ExtendedKeyboard>(R.id.extended_keyboard)
110-
extendedKeyboard.setKeyListener { char -> binding.editor.insert(char) }
113+
extendedKeyboard.setKeyListener { char ->
114+
try {
115+
binding.editor.insert(char)
116+
} catch (e: Exception) {
117+
}
118+
}
111119
extendedKeyboard.setHasFixedSize(true)
112120
extendedKeyboard.submitList("{},:_\"".map { it.toString() })
113121
extendedKeyboard.setBackgroundColor(getColorAttr(R.attr.primaryOrTextPrimary))

nb4a.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
PACKAGE_NAME=moe.nb4a
22
VERSION_NAME=1.3.9
3-
PRE_VERSION_NAME=pre-1.4.0-20250906-1
3+
PRE_VERSION_NAME=pre-1.4.0-20250906-2
44
VERSION_CODE=43

0 commit comments

Comments
 (0)