msgviewer: implement ProvidesMessages interface
This commit is contained in:
parent
98418764b6
commit
3e535f49b3
|
@ -25,6 +25,8 @@ import (
|
|||
|
||||
var ansi = regexp.MustCompile("^\x1B\\[[0-?]*[ -/]*[@-~]")
|
||||
|
||||
var _ ProvidesMessages = (*MessageViewer)(nil)
|
||||
|
||||
type MessageViewer struct {
|
||||
ui.Invalidatable
|
||||
acct *AccountView
|
||||
|
@ -232,6 +234,11 @@ func (mv *MessageViewer) SelectedMessage() (*models.MessageInfo, error) {
|
|||
return mv.msg, nil
|
||||
}
|
||||
|
||||
func (mv *MessageViewer) MarkedMessages() ([]*models.MessageInfo, error) {
|
||||
store := mv.Store()
|
||||
return msgInfoFromUids(store, store.Marked())
|
||||
}
|
||||
|
||||
func (mv *MessageViewer) ToggleHeaders() {
|
||||
switcher := mv.switcher
|
||||
mv.conf.Viewer.ShowHeaders = !mv.conf.Viewer.ShowHeaders
|
||||
|
|
Loading…
Reference in New Issue