Implement :next-message n%
This commit is contained in:
parent
ef6178a12a
commit
e780c6ee96
2 changed files with 16 additions and 1 deletions
widgets
|
|
@ -13,6 +13,7 @@ import (
|
|||
type MessageList struct {
|
||||
conf *config.AercConfig
|
||||
logger *log.Logger
|
||||
height int
|
||||
onInvalidate func(d ui.Drawable)
|
||||
selected int
|
||||
spinner *Spinner
|
||||
|
|
@ -45,6 +46,7 @@ func (ml *MessageList) Invalidate() {
|
|||
}
|
||||
|
||||
func (ml *MessageList) Draw(ctx *ui.Context) {
|
||||
ml.height = ctx.Height()
|
||||
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
|
||||
|
||||
if ml.store == nil {
|
||||
|
|
@ -91,6 +93,10 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func (ml *MessageList) Height() int {
|
||||
return ml.height
|
||||
}
|
||||
|
||||
func (ml *MessageList) SetStore(store *lib.MessageStore) {
|
||||
ml.store = store
|
||||
if store != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue