mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-02-28 09:07:51 +01:00
if a note cannot be loaded, still load the other ones
This commit is contained in:
parent
8d7a6c0c36
commit
4e845db003
@ -90,12 +90,16 @@ class DBHelper private constructor(private val mContext: Context) : SQLiteOpenHe
|
|||||||
cursor = mDb.query(TABLE_NAME, cols, null, null, null, null, "$COL_TITLE COLLATE NOCASE ASC")
|
cursor = mDb.query(TABLE_NAME, cols, null, null, null, null, "$COL_TITLE COLLATE NOCASE ASC")
|
||||||
if (cursor?.moveToFirst() == true) {
|
if (cursor?.moveToFirst() == true) {
|
||||||
do {
|
do {
|
||||||
val id = cursor.getIntValue(COL_ID)
|
try {
|
||||||
val title = cursor.getStringValue(COL_TITLE)
|
val id = cursor.getIntValue(COL_ID)
|
||||||
val value = cursor.getStringValue(COL_VALUE)
|
val title = cursor.getStringValue(COL_TITLE)
|
||||||
val type = cursor.getIntValue(COL_TYPE)
|
val value = cursor.getStringValue(COL_VALUE)
|
||||||
val note = Note(id, title, value, type)
|
val type = cursor.getIntValue(COL_TYPE)
|
||||||
notes.add(note)
|
val note = Note(id, title, value, type)
|
||||||
|
notes.add(note)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user