mirror of
				https://github.com/SimpleMobileTools/Simple-Notes.git
				synced 2025-06-05 17:00:23 +02:00 
			
		
		
		
	recheck options menu when a note is added or deleted
This commit is contained in:
		| @@ -51,8 +51,6 @@ public class MainActivity extends SimpleActivity { | |||||||
|         super.onResume(); |         super.onResume(); | ||||||
|         invalidateOptionsMenu(); |         invalidateOptionsMenu(); | ||||||
|         mNotesView.setTextSize(TypedValue.COMPLEX_UNIT_PX, Utils.getTextSize(getApplicationContext())); |         mNotesView.setTextSize(TypedValue.COMPLEX_UNIT_PX, Utils.getTextSize(getApplicationContext())); | ||||||
|  |  | ||||||
|         invalidateOptionsMenu(); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
| @@ -143,6 +141,7 @@ public class MainActivity extends SimpleActivity { | |||||||
|                     final int newNoteIndex = getNewNoteIndex(newNote); |                     final int newNoteIndex = getNewNoteIndex(newNote); | ||||||
|                     updateSelectedNote(newNoteIndex); |                     updateSelectedNote(newNoteIndex); | ||||||
|                     alertDialog.dismiss(); |                     alertDialog.dismiss(); | ||||||
|  |                     invalidateOptionsMenu(); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
| @@ -182,6 +181,7 @@ public class MainActivity extends SimpleActivity { | |||||||
|         mDb.deleteNote(mCurrentNote.getId()); |         mDb.deleteNote(mCurrentNote.getId()); | ||||||
|         mNotes = mDb.getNotes(); |         mNotes = mDb.getNotes(); | ||||||
|         updateSelectedNote(0); |         updateSelectedNote(0); | ||||||
|  |         invalidateOptionsMenu(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void displayOpenNoteDialog() { |     private void displayOpenNoteDialog() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user