fixing a glitch at managing clips
This commit is contained in:
parent
f46e560a09
commit
e21d7de886
4 changed files with 13 additions and 10 deletions
|
@ -64,9 +64,9 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:e3376e4f56'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:e5a4973e6a'
|
||||||
|
|
||||||
kapt 'androidx.room:room-compiler:2.3.0'
|
kapt 'androidx.room:room-compiler:2.4.2'
|
||||||
implementation 'androidx.room:room-runtime:2.3.0'
|
implementation 'androidx.room:room-runtime:2.4.2'
|
||||||
annotationProcessor 'androidx.room:room-compiler:2.3.0'
|
annotationProcessor 'androidx.room:room-compiler:2.4.2'
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,12 +85,15 @@ class ClipsActivityAdapter(
|
||||||
clip.id = null
|
clip.id = null
|
||||||
clip.id = ClipsHelper(activity).insertClip(clip)
|
clip.id = ClipsHelper(activity).insertClip(clip)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
wasClipMoved = false
|
wasClipMoved = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
// However, avoid doing that in cases when the EditText for example requires numbers as the input.
|
// However, avoid doing that in cases when the EditText for example requires numbers as the input.
|
||||||
// We can detect that by the text not changing on pressing Space.
|
// We can detect that by the text not changing on pressing Space.
|
||||||
if (keyboardMode != KEYBOARD_LETTERS && code == MyKeyboard.KEYCODE_SPACE) {
|
if (keyboardMode != KEYBOARD_LETTERS && code == MyKeyboard.KEYCODE_SPACE) {
|
||||||
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text
|
val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return
|
||||||
inputConnection.commitText(codeChar.toString(), 1)
|
inputConnection.commitText(codeChar.toString(), 1)
|
||||||
val newText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text
|
val newText = inputConnection.getExtractedText(ExtractedTextRequest(), 0).text
|
||||||
switchToLetters = originalText != newText
|
switchToLetters = originalText != newText
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.10'
|
ext.kotlin_version = '1.6.21'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
@ -9,7 +9,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
classpath 'com.android.tools.build:gradle:7.1.3'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|
Loading…
Reference in a new issue