mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-02 01:36:50 +01:00
add SQLiteBlobTooBigException catch for safeMoveToPosition
This commit is contained in:
parent
afac44ca43
commit
17397628fc
@ -1,6 +1,7 @@
|
||||
package org.mariotaku.ktextension
|
||||
|
||||
import android.database.Cursor
|
||||
import android.database.sqlite.SQLiteBlobTooBigException
|
||||
import org.mariotaku.library.objectcursor.ObjectCursor
|
||||
import java.util.*
|
||||
|
||||
@ -12,6 +13,8 @@ fun Cursor.safeMoveToPosition(pos: Int) = try {
|
||||
moveToPosition(pos)
|
||||
} catch (e: IllegalStateException) {
|
||||
false
|
||||
} catch (e: SQLiteBlobTooBigException) {
|
||||
false
|
||||
}
|
||||
|
||||
fun Cursor.safeGetLong(columnIndex: Int, def: Long = -1) = try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user