Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sidebar): use abbreviated path if possible (#2304)
* fix(sidebar): use abbreviated path if possible After the refactor in commit d77c704, the sidebar only displays a mailbox's full path/URI except in the case of 'sidebar_short_path'. The full path/URI is not preferable for end users. What broke during the refactor is how the variable 'display' is updated. It's initialized to a mailbox's full path/URI and only updated if using 'sidebar_short_path'. However, after initialization, an abbreviation is calculated to remove the 'folder' or protocol. To resolve this issue, if there's an abbreviation, store it in the 'display' variable. Fixes #2293 * fix(sidebar): don't indent full mailbox paths If the sidebar is displaying a full mailbox path while using 'sidebar_short_path=yes', it will indent the entry based on the number of delimiters in the path. Since '/' is a default delimiter, there is significant indentation for local folders. To resolve this, if the sidebar displays the full path, ignore the 'sidebar_short_path' for that entry. While full paths aren't particularly user friendly, indented full paths are worse. * fix(sidebar): record abbr state before short path Record if there's been an abbreviation before updating 'display' with the shortpath. Otherwise, we'll lose track of if we had one, which is crucial to indentation. Indentation shouldn't happen on a full path mailbox, even if it's only showing the last part.
- Loading branch information