aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJulio B <julio.bacel@gmail.com>2024-03-06 01:11:05 +0200
committerRobin Jarry <robin@jarry.cc>2024-04-13 21:46:32 +0200
commit941e2e9e7de058f9e6e10efab1ece8be4188468e (patch)
tree85907c9c23171768c9ba9c41d42f8e802ece3039 /app
parent672b4edca7af2303cfcb1d69a676556d12476b5f (diff)
downloadaerc-941e2e9e7de058f9e6e10efab1ece8be4188468e.tar.gz
aerc-941e2e9e7de058f9e6e10efab1ece8be4188468e.zip
ui: use a custom prefix for dummy root
These messages are not really the root of the thread, and should not be displayed as such. Add a new special prefix to make them appear like the first child of a rootless thread. Signed-off-by: Julio B <julio.bacel@gmail.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/msglist.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/msglist.go b/app/msglist.go
index 4cdf614a..996ffa0c 100644
--- a/app/msglist.go
+++ b/app/msglist.go
@@ -438,7 +438,7 @@ func unreadInThread(thread *types.Thread, store *lib.MessageStore) (ctr int) {
func threadPrefix(t *types.Thread, reverse bool, msglist bool) string {
uiConfig := SelectedAccountUiConfig()
- var tip, prefix, firstChild, lastSibling, orphan string
+ var tip, prefix, firstChild, lastSibling, orphan, dummy string
if msglist {
tip = uiConfig.ThreadPrefixTip
} else {
@@ -472,10 +472,12 @@ func threadPrefix(t *types.Thread, reverse bool, msglist bool) string {
firstChild = uiConfig.ThreadPrefixFirstChildReverse
lastSibling = uiConfig.ThreadPrefixLastSiblingReverse
orphan = uiConfig.ThreadPrefixOrphanReverse
+ dummy = uiConfig.ThreadPrefixDummyReverse
} else {
firstChild = uiConfig.ThreadPrefixFirstChild
lastSibling = uiConfig.ThreadPrefixLastSibling
orphan = uiConfig.ThreadPrefixOrphan
+ dummy = uiConfig.ThreadPrefixDummy
}
var hiddenOffspring bool = t.FirstChild != nil && t.FirstChild.Hidden > 0
@@ -503,6 +505,8 @@ func threadPrefix(t *types.Thread, reverse bool, msglist bool) string {
uiConfig.ThreadPrefixTip
case t.Parent == nil && hiddenOffspring:
prefix = uiConfig.ThreadPrefixFolded
+ case t.Parent == nil && t.Dummy:
+ prefix = dummy + tip
case t.Parent == nil && t.FirstChild != nil:
prefix = orphan
case t.Parent == nil && t.FirstChild == nil: