mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +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) {
|
onTapLink: (String link) {
|
||||||
if (link.startsWith('./')) {
|
if (link.startsWith('./')) {
|
||||||
var spec = link.substring(2);
|
var spec = link.substring(2);
|
||||||
var note = rootFolder.getNoteWithSpec(spec);
|
var linkedNote = note.parent.getNoteWithSpec(spec);
|
||||||
if (note != null) {
|
if (linkedNote != null) {
|
||||||
openNoteEditor(context, note);
|
openNoteEditor(context, linkedNote);
|
||||||
} else {
|
} else {
|
||||||
showSnackbar(context, "Link '$link' not found");
|
showSnackbar(context, "Link '$link' not found");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user