about summary refs log tree commit diff stats
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 8681de8..59b5c47 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,
ensa/cfg/commit/bin/op?id=1ddfd9ba56511a4136dfe83e1f581ac52c79c0e9'>1ddfd9b ^
8fa69fc ^

e1d03e2 ^
8fa69fc ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33