File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
app/src/main/kotlin/com/simplemobiletools/notes/pro/activities Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,7 @@ class MainActivity : SimpleActivity() {
250250 private fun initViewPager () {
251251 NotesHelper (this ).getNotes {
252252 mNotes = it
253+ invalidateOptionsMenu()
253254 mCurrentNote = mNotes[0 ]
254255 mAdapter = NotesPagerAdapter (supportFragmentManager, mNotes, this )
255256 view_pager.apply {
@@ -307,7 +308,6 @@ class MainActivity : SimpleActivity() {
307308 NotesHelper (this ).insertOrUpdateNote(note) {
308309 val newNoteId = it
309310 showSaveButton = false
310- invalidateOptionsMenu()
311311 initViewPager()
312312 updateSelectedNote(newNoteId)
313313 view_pager.onGlobalLayout {
@@ -407,7 +407,6 @@ class MainActivity : SimpleActivity() {
407407 NotesHelper (this ).getNotes {
408408 mNotes = it
409409 showSaveButton = false
410- invalidateOptionsMenu()
411410 initViewPager()
412411 }
413412 }
@@ -590,7 +589,6 @@ class MainActivity : SimpleActivity() {
590589 updateWidgets()
591590 }
592591
593- invalidateOptionsMenu()
594592 initViewPager()
595593
596594 if (deleteFile) {
You can’t perform that action at this time.
0 commit comments