Merge pull request #654 from esensar/sdk-34-migration

Update targetSdkVersion to 34
This commit is contained in:
Tibor Kaputa 2023-07-31 18:13:05 +02:00 committed by GitHub
commit 03d0ea826b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -13,12 +13,12 @@ if (keystorePropertiesFile.exists()) {
} }
android { android {
compileSdk 33 compileSdk 34
defaultConfig { defaultConfig {
applicationId "com.simplemobiletools.notes.pro" applicationId "com.simplemobiletools.notes.pro"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 33 targetSdkVersion 34
versionCode 107 versionCode 107
versionName "6.15.6" versionName "6.15.6"
setProperty("archivesBaseName", "notes") setProperty("archivesBaseName", "notes")

View File

@ -126,7 +126,7 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
val noteId = intent.getLongExtra(NOTE_ID, 0L) val noteId = intent.getLongExtra(NOTE_ID, 0L)
note = context.notesDB.getNoteWithId(noteId) note = context.notesDB.getNoteWithId(noteId)
if (note?.type == NoteType.TYPE_CHECKLIST) { if (note?.type == NoteType.TYPE_CHECKLIST) {
checklistItems = note!!.getNoteStoredValue(context)?.let { Json.decodeFromString(it) } ?: mutableListOf() checklistItems = note!!.getNoteStoredValue(context)?.ifEmpty { "[]" }?.let { Json.decodeFromString(it) } ?: mutableListOf()
// checklist title can be null only because of the glitch in upgrade to 6.6.0, remove this check in the future // checklist title can be null only because of the glitch in upgrade to 6.6.0, remove this check in the future
checklistItems = checklistItems.filter { it.title != null }.toMutableList() as ArrayList<ChecklistItem> checklistItems = checklistItems.filter { it.title != null }.toMutableList() as ArrayList<ChecklistItem>