Skip to content

Commit 03a6061

Browse files
authored
Merge pull request #14 from llastkrakw/dev
fixed crash on add note page
2 parents f7d92f3 + 70cb661 commit 03a6061

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ android {
1717
minSdkVersion 26
1818
targetSdkVersion 30
1919
versionCode appVersionCode
20-
versionName "1.0"
20+
versionName "1.0.1"
2121
vectorDrawables.useSupportLibrary = true
2222

2323
// Consult the README on instructions for setting up Unsplash API key

app/src/main/java/com/llastkrakw/nevernote/views/notes/activities/AddNoteActivity.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import com.llastkrakw.nevernote.feature.note.viewModels.NoteViewModelFactory
5858
import com.llastkrakw.nevernote.views.notes.activities.NoteDetailActivity.Companion.NOTE_UPDATE_EXTRA
5959
import com.llastkrakw.nevernote.views.notes.fragments.RecordDialogFragment
6060
import com.llastkrakw.nevernote.views.notes.fragments.RecordDialogFragment.Companion.NOTE_ID_FOR_SERVICE
61+
import java.lang.NullPointerException
6162
import java.util.*
6263

6364

@@ -197,7 +198,13 @@ class AddNoteActivity : AppCompatActivity(), ImagePickerBottomsheet.ItemClickLis
197198
recordRecycler.layoutManager = LinearLayoutManager(this@AddNoteActivity)
198199

199200
noteViewModel.allRecordRef.observe(this@AddNoteActivity, {
200-
recordAdapter.submitList(getRecordForNote(noteForUpdate, noteId!!, it))
201+
try {
202+
if(it.isNotEmpty())
203+
recordAdapter.submitList(getRecordForNote(noteForUpdate, noteId!!, it))
204+
}
205+
catch (error : NullPointerException){
206+
Log.d("crash", "null crash in add note")
207+
}
201208
})
202209

203210
recordRecycler.adapter = recordAdapter

release_notes.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
CAPTURE IDEAS
2-
- Write, collect and capture ideas in the form of notes and notebooks.
3-
- Add different types of content to your notes:
4-
audio & wallpaper for now.
5-
- Style your notes with a full-featured text editor.
6-
- Add reminders to your notes so they are useful when you need them.
7-
8-
9-
10-
GET ORGANIZED
11-
- Manage your to-do list with the Tasks feature: set up due dates and reminders so you never miss a deadline.
12-
- Get instant access to your important information in the Home dashboard.
1+
*Fixed crash on add note page

0 commit comments

Comments
 (0)