command/help: remove helpClose function
The helpClose function is used to call UpdateScreen on MessageViewer, which has the effect of invalidating and redrawing the message view. This logic is redundant with the addition of tcell-term and the main event loop. Remove the helpClose calls. Remove the UpdateScreen methods from messageviewer: those functions are only used by the helpClose function. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Koni Marti <koni.marti@gmail.com>
This commit is contained in:
parent
3687b18149
commit
ee964ad6b0
2 changed files with 0 additions and 27 deletions
|
@ -50,7 +50,6 @@ func (Help) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
aerc.HumanReadableBindings(),
|
aerc.HumanReadableBindings(),
|
||||||
aerc.SelectedAccountUiConfig(),
|
aerc.SelectedAccountUiConfig(),
|
||||||
func(_ string) {
|
func(_ string) {
|
||||||
helpClose(aerc)
|
|
||||||
aerc.CloseDialog()
|
aerc.CloseDialog()
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -61,9 +60,3 @@ func (Help) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
|
|
||||||
return TermCore(aerc, []string{"term", "man", page})
|
return TermCore(aerc, []string{"term", "man", page})
|
||||||
}
|
}
|
||||||
|
|
||||||
func helpClose(aerc *widgets.Aerc) {
|
|
||||||
if content, ok := aerc.SelectedTabContent().(*widgets.MessageViewer); ok {
|
|
||||||
content.UpdateScreen()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -387,22 +387,6 @@ func (mv *MessageViewer) Close() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mv *MessageViewer) UpdateScreen() {
|
|
||||||
if mv.switcher == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
parts := mv.switcher.parts
|
|
||||||
selected := mv.switcher.selected
|
|
||||||
if selected < 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if len(parts) > 0 && selected < len(parts) {
|
|
||||||
if part := parts[selected]; part != nil {
|
|
||||||
part.UpdateScreen()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ps *PartSwitcher) Invalidate() {
|
func (ps *PartSwitcher) Invalidate() {
|
||||||
ui.Invalidate()
|
ui.Invalidate()
|
||||||
}
|
}
|
||||||
|
@ -638,10 +622,6 @@ func (pv *PartViewer) SetSource(reader io.Reader) {
|
||||||
pv.attemptCopy()
|
pv.attemptCopy()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pv *PartViewer) UpdateScreen() {
|
|
||||||
pv.Invalidate()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (pv *PartViewer) attemptCopy() {
|
func (pv *PartViewer) attemptCopy() {
|
||||||
if pv.source == nil ||
|
if pv.source == nil ||
|
||||||
pv.filter == nil ||
|
pv.filter == nil ||
|
||||||
|
|
Loading…
Reference in a new issue