mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
FolderView: Show the correct title
This commit is contained in:
@ -88,9 +88,15 @@ class _FolderViewState extends State<FolderView> {
|
|||||||
child: Icon(Icons.add),
|
child: Icon(Icons.add),
|
||||||
);
|
);
|
||||||
|
|
||||||
var title = widget.notesFolder.parent == null
|
// If this is a Virtual folder which doesn't overwrite the FS folder's name
|
||||||
? "Notes"
|
// then we should use it's given name as the title
|
||||||
|
String title = widget.notesFolder.name;
|
||||||
|
var fsFolder = widget.notesFolder.fsFolder;
|
||||||
|
if (fsFolder.name == widget.notesFolder.name) {
|
||||||
|
title = widget.notesFolder.parent == null
|
||||||
|
? "Root Folder"
|
||||||
: widget.notesFolder.pathSpec();
|
: widget.notesFolder.pathSpec();
|
||||||
|
}
|
||||||
|
|
||||||
var folderView = Builder(
|
var folderView = Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
Reference in New Issue
Block a user