mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-25 15:25:29 +08:00
Implement a very basic file system view
This will show all the files and not just the "notes". This way the user can easily figure out why a file isn't included in the list of notes. It's currently disabled by default as it clearly needs a lot more work.
This commit is contained in:
@ -102,6 +102,21 @@ class GitNoteRepository {
|
||||
return NoteRepoResult(noteFilePath: newFullPath, error: false);
|
||||
}
|
||||
|
||||
Future<NoteRepoResult> renameFile(
|
||||
String oldFullPath,
|
||||
String newFullPath,
|
||||
) async {
|
||||
// FIXME: This is a hacky way of adding the changes, ideally we should be calling rm + add or something
|
||||
await _gitRepo.add(".");
|
||||
await _gitRepo.commit(
|
||||
message: "Renamed File",
|
||||
authorEmail: Settings.instance.gitAuthorEmail,
|
||||
authorName: Settings.instance.gitAuthor,
|
||||
);
|
||||
|
||||
return NoteRepoResult(noteFilePath: newFullPath, error: false);
|
||||
}
|
||||
|
||||
Future<NoteRepoResult> moveNote(
|
||||
String oldFullPath,
|
||||
String newFullPath,
|
||||
|
Reference in New Issue
Block a user