aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account.go1
-rw-r--r--widgets/msglist.go14
2 files changed, 11 insertions, 4 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 982d75f8..7e380996 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -255,6 +255,7 @@ func (acct *AccountView) newStore(name string) *lib.MessageStore {
}
},
acct.updateSplitView,
+ acct.dirlist.UiConfig(name).ThreadContext,
)
store.SetMarker(marker.New(store))
return store
diff --git a/widgets/msglist.go b/widgets/msglist.go
index dcb4cd31..3187b5d5 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -209,8 +209,13 @@ func addMessage(
}
// folded thread
templateData, ok := data.(models.TemplateData)
- if ok && templateData.ThreadFolded() {
- params.styles = append(params.styles, config.STYLE_MSGLIST_THREAD_FOLDED)
+ if ok {
+ if templateData.ThreadFolded() {
+ params.styles = append(params.styles, config.STYLE_MSGLIST_THREAD_FOLDED)
+ }
+ if templateData.ThreadContext() {
+ params.styles = append(params.styles, config.STYLE_MSGLIST_THREAD_CONTEXT)
+ }
}
// marked message
marked := store.Marker().IsMarked(msg.Uid)
@@ -476,7 +481,7 @@ func newThreadView(store *lib.MessageStore) *threadView {
}
func (t *threadView) Update(data state.DataSetter, uid uint32) {
- prefix, same, count, folded := "", false, 0, false
+ prefix, same, count, folded, context := "", false, 0, false, false
thread, err := t.store.Thread(uid)
if thread != nil && err == nil {
prefix = threadPrefix(thread, t.reverse, true)
@@ -486,6 +491,7 @@ func (t *threadView) Update(data state.DataSetter, uid uint32) {
t.prevSubj = subject
count = countThreads(thread)
folded = thread.FirstChild != nil && thread.FirstChild.Hidden
+ context = thread.Context
}
- data.SetThreading(prefix, same, count, folded)
+ data.SetThreading(prefix, same, count, folded, context)
}