mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
Fix folder short names
This commit is contained in:
@ -122,6 +122,14 @@ class FolderTileState extends State<FolderTile> {
|
||||
|
||||
final theme = Theme.of(context);
|
||||
|
||||
var publicName = folder.publicName;
|
||||
if (folder.parent != null) {
|
||||
publicName = publicName.substring(folder.parent.pathSpec().length);
|
||||
if (publicName.startsWith('/')) {
|
||||
publicName = publicName.substring(1);
|
||||
}
|
||||
}
|
||||
|
||||
var selected = widget.selectedFolder == widget.folder;
|
||||
return Card(
|
||||
child: ListTile(
|
||||
@ -135,7 +143,7 @@ class FolderTileState extends State<FolderTile> {
|
||||
color: Theme.of(context).accentColor,
|
||||
),
|
||||
),
|
||||
title: Text(folder.publicName),
|
||||
title: Text(publicName),
|
||||
subtitle: Text(subtitle),
|
||||
trailing: trailling,
|
||||
selected: selected,
|
||||
|
Reference in New Issue
Block a user