From b6f7b5bbd9bee392ca73038070e906ae0702f1b5 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 5 Jul 2020 00:40:46 -0400 Subject: [PATCH] Ensure conversation view is regenerated appropriately If the user has selected "Limit to filter" in the conversations view, then if the display filter has changed in the main view since the last time the conversations view was opened, the data needs to be regenerated. --- ui/convsui.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/convsui.go b/ui/convsui.go index 4c37e60..0c48609 100644 --- a/ui/convsui.go +++ b/ui/convsui.go @@ -200,7 +200,8 @@ func (p pleaseWait) ClosePleaseWait(app gowid.IApp) { ClosePleaseWait(app) } -// Dynamically load conv +// Dynamically load conv. If the convs window was last opened with a different filter, and the "limit to +// filter" checkbox is checked, then the data needs to be reloaded. func openConvsUi(app gowid.IApp) { var convCtx context.Context @@ -227,6 +228,8 @@ func openConvsUi(app gowid.IApp) { ) convsView = holder.New(convsUi) + } else if convsUi.FilterValue() != Loader.DisplayFilter() && convsUi.UseFilter() { + convsUi.ReloadNeeded() } convsUi.ctx = convCtx