recheck options menu when a note is added or deleted

This commit is contained in:
tibbi 2016-10-02 19:36:02 +02:00
parent adac7cbf28
commit 962c5cb74d

View File

@ -51,8 +51,6 @@ public class MainActivity extends SimpleActivity {
super.onResume();
invalidateOptionsMenu();
mNotesView.setTextSize(TypedValue.COMPLEX_UNIT_PX, Utils.getTextSize(getApplicationContext()));
invalidateOptionsMenu();
}
@Override
@ -143,6 +141,7 @@ public class MainActivity extends SimpleActivity {
final int newNoteIndex = getNewNoteIndex(newNote);
updateSelectedNote(newNoteIndex);
alertDialog.dismiss();
invalidateOptionsMenu();
}
}
});
@ -182,6 +181,7 @@ public class MainActivity extends SimpleActivity {
mDb.deleteNote(mCurrentNote.getId());
mNotes = mDb.getNotes();
updateSelectedNote(0);
invalidateOptionsMenu();
}
private void displayOpenNoteDialog() {