Skip to content

Commit e21d7de

Browse files
committed
fixing a glitch at managing clips
1 parent f46e560 commit e21d7de

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ android {
6464
}
6565

6666
dependencies {
67-
implementation 'com.github.SimpleMobileTools:Simple-Commons:e3376e4f56'
67+
implementation 'com.github.SimpleMobileTools:Simple-Commons:e5a4973e6a'
6868

69-
kapt 'androidx.room:room-compiler:2.3.0'
70-
implementation 'androidx.room:room-runtime:2.3.0'
71-
annotationProcessor 'androidx.room:room-compiler:2.3.0'
69+
kapt 'androidx.room:room-compiler:2.4.2'
70+
implementation 'androidx.room:room-runtime:2.4.2'
71+
annotationProcessor 'androidx.room:room-compiler:2.4.2'
7272
}

app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsActivityAdapter.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ class ClipsActivityAdapter(
8585
clip.id = null
8686
clip.id = ClipsHelper(activity).insertClip(clip)
8787
}
88-
}
8988

90-
activity.runOnUiThread {
91-
notifyDataSetChanged()
89+
activity.runOnUiThread {
90+
notifyDataSetChanged()
91+
}
9292
}
93+
} else {
94+
notifyDataSetChanged()
9395
}
96+
9497
wasClipMoved = false
9598
}
9699

app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
165165
// However, avoid doing that in cases when the EditText for example requires numbers as the input.
166166
// We can detect that by the text not changing on pressing Space.
167167
if (keyboardMode != KEYBOARD_LETTERS && code == MyKeyboard.KEYCODE_SPACE) {
168-
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text
168+
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return
169169
inputConnection.commitText(codeChar.toString(), 1)
170170
val newText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text
171171
switchToLetters = originalText != newText

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.6.10'
4+
ext.kotlin_version = '1.6.21'
55

66
repositories {
77
google()
88
jcenter()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.1.2'
12+
classpath 'com.android.tools.build:gradle:7.1.3'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414

1515
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)