aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKevin Kuehler <keur@xcf.berkeley.edu>2019-10-28 12:07:05 -0700
committerBen Burwell <ben@benburwell.com>2019-10-29 11:07:45 -0400
commit75cbf8dc0376429d6cdb6a6716b6a9b41fb681f1 (patch)
treebe0db1beda8f84c5ad4ad8cc2924b511487a5759 /lib
parent4c8d9ad26cce588cc4ea2259cd7ca83d2801c102 (diff)
Add threading control path to msglist.Draw()
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
Diffstat (limited to 'lib')
-rw-r--r--lib/format/format.go6
-rw-r--r--lib/msgstore.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/format/format.go b/lib/format/format.go
index b403f2d..c71ae93 100644
--- a/lib/format/format.go
+++ b/lib/format/format.go
@@ -10,8 +10,8 @@ import (
)
func ParseMessageFormat(format string, timestampformat string,
- accountName string, number int, msg *models.MessageInfo) (string,
- []interface{}, error) {
+ accountName string, number int, msg *models.MessageInfo,
+ subjectThread string) (string, []interface{}, error) {
retval := make([]byte, 0, len(format))
var args []interface{}
@@ -147,7 +147,7 @@ func ParseMessageFormat(format string, timestampformat string,
args = append(args, addrs)
case 's':
retval = append(retval, 's')
- args = append(args, msg.Envelope.Subject)
+ args = append(args, subjectThread+msg.Envelope.Subject)
case 't':
if len(msg.Envelope.To) == 0 {
return "", nil,
diff --git a/lib/msgstore.go b/lib/msgstore.go
index c2361dc..e2e968b 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -179,7 +179,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
newMap := make(map[uint32]*models.MessageInfo)
for i := len(msg.Threads) - 1; i >= 0; i-- {
- msg.Threads[i].FormatThread(func(t *types.Thread, x string) bool {
+ msg.Threads[i].FormatThread(func(t *types.Thread, x []rune) bool {
uid := t.Uid
uids = append([]uint32{uid}, uids...)
if msg, ok := store.Messages[uid]; ok {