mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
Don't respond to keys in roster when headless
This commit is contained in:
parent
6947f2c03c
commit
68cfe2be80
2 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,7 @@ type MatrixContainer interface {
|
|||
Preferences() *config.UserPreferences
|
||||
InitClient(isStartup bool) error
|
||||
Initialized() bool
|
||||
IsHeadless() bool
|
||||
|
||||
Start()
|
||||
Stop()
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Add table
Reference in a new issue