From f6ae948fb064abda25d648a76abda131f47de3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 28 Jul 2023 16:34:11 +0200 Subject: [PATCH 1/2] Prevent widget crash when checklist is empty --- .../com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt index 3e3ce217..8aaf006f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt @@ -126,7 +126,7 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi val noteId = intent.getLongExtra(NOTE_ID, 0L) note = context.notesDB.getNoteWithId(noteId) 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 checklistItems = checklistItems.filter { it.title != null }.toMutableList() as ArrayList From 6a97150b9198243b10dafb64b666279d5717e7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Fri, 28 Jul 2023 16:44:29 +0200 Subject: [PATCH 2/2] Update targetSdkVersion to 34 There are 2 known issues with this update: - Max font scaling does not look well in the PagerTabStrip - Not sure if caused by the update, updating file linked to the note sometimes fails with SecurityException No other changes from these lists affects this app: - https://developer.android.com/about/versions/14/behavior-changes-all - https://developer.android.com/about/versions/14/behavior-changes-14 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c2f55d37..ef194365 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,12 +13,12 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "com.simplemobiletools.notes.pro" minSdkVersion 23 - targetSdkVersion 33 + targetSdkVersion 34 versionCode 107 versionName "6.15.6" setProperty("archivesBaseName", "notes")