fix a glitch with note content being trimmed

This commit is contained in:
tibbi 2019-09-16 22:10:46 +02:00
parent 7e0cdcf933
commit 55a460572b
2 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.17.0'
implementation 'com.simplemobiletools:commons:5.17.17'
kapt 'androidx.room:room-compiler:2.1.0'
implementation 'androidx.room:room-runtime:2.1.0'

View File

@ -575,7 +575,8 @@ class MainActivity : SimpleActivity() {
}
contentResolver.openOutputStream(document.uri).apply {
write(content.toByteArray(Charset.forName("UTF-8")), 0, content.length)
val byteArray = content.toByteArray(Charset.forName("UTF-8"))
write(byteArray, 0, byteArray.size)
flush()
close()
}