mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-01-31 06:24: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")
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
do {
|
||||
val id = cursor.getIntValue(COL_ID)
|
||||
val title = cursor.getStringValue(COL_TITLE)
|
||||
val value = cursor.getStringValue(COL_VALUE)
|
||||
val type = cursor.getIntValue(COL_TYPE)
|
||||
val note = Note(id, title, value, type)
|
||||
notes.add(note)
|
||||
try {
|
||||
val id = cursor.getIntValue(COL_ID)
|
||||
val title = cursor.getStringValue(COL_TITLE)
|
||||
val value = cursor.getStringValue(COL_VALUE)
|
||||
val type = cursor.getIntValue(COL_TYPE)
|
||||
val note = Note(id, title, value, type)
|
||||
notes.add(note)
|
||||
} catch (e: Exception) {
|
||||
continue
|
||||
}
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user