Skip to content

Commit

Permalink
Ensure conversation view is regenerated appropriately
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gcla committed Jul 5, 2020
1 parent df5ad6b commit b6f7b5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/convsui.go
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b6f7b5b

Please sign in to comment.