mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
Fix opening on relative notes when clicking on a link
This commit is contained in:
@ -63,9 +63,9 @@ class NoteViewer extends StatelessWidget {
|
||||
onTapLink: (String link) {
|
||||
if (link.startsWith('./')) {
|
||||
var spec = link.substring(2);
|
||||
var note = rootFolder.getNoteWithSpec(spec);
|
||||
if (note != null) {
|
||||
openNoteEditor(context, note);
|
||||
var linkedNote = note.parent.getNoteWithSpec(spec);
|
||||
if (linkedNote != null) {
|
||||
openNoteEditor(context, linkedNote);
|
||||
} else {
|
||||
showSnackbar(context, "Link '$link' not found");
|
||||
}
|
||||
|
Reference in New Issue
Block a user