mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
Add the concept of Editors
* We no longer have a separate editing and browsing view - This does mean we loose the ability to quick flip between notes by swiping. However, this is more how a note editor would behave. I do later want to add that capability back. * We have 2 editors for now - Markdown and Raw. By default we use the Markdown editor which can be toggled between Preview / Edit mode. I later want to add a rich text editor and a todo editor as well.
This commit is contained in:
@ -151,11 +151,6 @@ class StateContainerState extends State<StateContainer> {
|
||||
}
|
||||
|
||||
void renameNote(Note note, String newFileName) async {
|
||||
// Do not let the user rename it to a non-markdown file
|
||||
if (!newFileName.toLowerCase().endsWith('.md')) {
|
||||
newFileName += '.md';
|
||||
}
|
||||
|
||||
var oldNotePath = note.filePath;
|
||||
note.rename(newFileName);
|
||||
|
||||
@ -181,8 +176,8 @@ class StateContainerState extends State<StateContainer> {
|
||||
});
|
||||
}
|
||||
|
||||
void undoRemoveNote(Note note, int index) {
|
||||
note.parent.insert(index, note);
|
||||
void undoRemoveNote(Note note) {
|
||||
note.parent.insert(0, note);
|
||||
_gitRepo.resetLastCommit().then((NoteRepoResult _) {
|
||||
syncNotes();
|
||||
});
|
||||
|
Reference in New Issue
Block a user