mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-13 07:00:10 +01:00
add a null check to the viewpager
This commit is contained in:
parent
613eb0d7d5
commit
4c02e295f3
@ -194,7 +194,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun currentNotesView() = mAdapter?.getItem(view_pager.currentItem)?.notes_view
|
||||
private fun currentNotesView() = if (view_pager == null) null else mAdapter?.getItem(view_pager.currentItem)?.notes_view
|
||||
|
||||
private fun displayRenameDialog() {
|
||||
RenameNoteDialog(this, mDb, mCurrentNote) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user