Don't respond to keys in roster when headless

This commit is contained in:
FIGBERT 2023-06-24 13:00:01 +03:00
parent 6947f2c03c
commit 68cfe2be80
No known key found for this signature in database
GPG key ID: 67F1598D607A844B
2 changed files with 5 additions and 0 deletions

View file

@ -45,6 +45,7 @@ type MatrixContainer interface {
Preferences() *config.UserPreferences
InitClient(isStartup bool) error
Initialized() bool
IsHeadless() bool
Start()
Stop()

View file

@ -494,6 +494,10 @@ func (rstr *RosterView) Draw(screen mauview.Screen) {
}
func (rstr *RosterView) OnKeyEvent(event mauview.KeyEvent) bool {
if rstr.parent.matrix.IsHeadless() {
return false
}
kb := config.Keybind{
Key: event.Key(),
Ch: event.Rune(),