diff options
Diffstat (limited to 'ui/messages')
-rw-r--r-- | ui/messages/base.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ui/messages/base.go b/ui/messages/base.go index 4d82b00..e86b85c 100644 --- a/ui/messages/base.go +++ b/ui/messages/base.go @@ -85,6 +85,13 @@ type UIMessage struct { Renderer MessageRenderer } +func (msg *UIMessage) GetEvent() *event.Event { + if msg == nil { + return nil + } + return msg.Event +} + const DateFormat = "January _2, 2006" const TimeFormat = "15:04:05" @@ -314,9 +321,9 @@ func (msg *UIMessage) DrawReactions(screen mauview.Screen) { } func (msg *UIMessage) Draw(screen mauview.Screen) { - screen = msg.DrawReply(screen) - msg.Renderer.Draw(screen) - msg.DrawReactions(screen) + proxyScreen := msg.DrawReply(screen) + msg.Renderer.Draw(proxyScreen) + msg.DrawReactions(proxyScreen) if msg.IsSelected { w, h := screen.Size() for x := 0; x < w; x++ { @@ -324,7 +331,7 @@ func (msg *UIMessage) Draw(screen mauview.Screen) { mainc, combc, style, _ := screen.GetContent(x, y) _, bg, _ := style.Decompose() if bg == tcell.ColorDefault { - screen.SetContent(x, y, mainc, combc, style.Background(tcell.ColorLightSkyBlue)) + screen.SetContent(x, y, mainc, combc, style.Background(tcell.ColorDarkGreen)) } } } |