mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +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);
|
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;
|
var selected = widget.selectedFolder == widget.folder;
|
||||||
return Card(
|
return Card(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
@ -135,7 +143,7 @@ class FolderTileState extends State<FolderTile> {
|
|||||||
color: Theme.of(context).accentColor,
|
color: Theme.of(context).accentColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: Text(folder.publicName),
|
title: Text(publicName),
|
||||||
subtitle: Text(subtitle),
|
subtitle: Text(subtitle),
|
||||||
trailing: trailling,
|
trailing: trailling,
|
||||||
selected: selected,
|
selected: selected,
|
||||||
|
Reference in New Issue
Block a user