aboutsummaryrefslogtreecommitdiffstats
path: root/lib/format/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/format/format.go')
-rw-r--r--lib/format/format.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/format/format.go b/lib/format/format.go
index 8681de8e..59b5c479 100644
--- a/lib/format/format.go
+++ b/lib/format/format.go
@@ -45,6 +45,10 @@ type Ctx struct {
MsgNum int
MsgInfo *models.MessageInfo
MsgIsMarked bool
+
+ // UI controls for threading
+ ThreadPrefix string
+ ThreadSameSubject bool
}
func ParseMessageFormat(format string, timeFmt string, thisDayTimeFmt string,
@@ -213,7 +217,13 @@ func ParseMessageFormat(format string, timeFmt string, thisDayTimeFmt string,
args = append(args, addrs)
case 's':
retval = append(retval, 's')
- args = append(args, envelope.Subject)
+ // if we are threaded strip the repeated subjects unless it's the
+ // first on the screen
+ subject := envelope.Subject
+ if ctx.ThreadSameSubject {
+ subject = ""
+ }
+ args = append(args, ctx.ThreadPrefix+subject)
case 't':
if len(envelope.To) == 0 {
return "", nil,