mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33: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
|
Preferences() *config.UserPreferences
|
||||||
InitClient(isStartup bool) error
|
InitClient(isStartup bool) error
|
||||||
Initialized() bool
|
Initialized() bool
|
||||||
|
IsHeadless() bool
|
||||||
|
|
||||||
Start()
|
Start()
|
||||||
Stop()
|
Stop()
|
||||||
|
|
|
@ -494,6 +494,10 @@ func (rstr *RosterView) Draw(screen mauview.Screen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rstr *RosterView) OnKeyEvent(event mauview.KeyEvent) bool {
|
func (rstr *RosterView) OnKeyEvent(event mauview.KeyEvent) bool {
|
||||||
|
if rstr.parent.matrix.IsHeadless() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
kb := config.Keybind{
|
kb := config.Keybind{
|
||||||
Key: event.Key(),
|
Key: event.Key(),
|
||||||
Ch: event.Rune(),
|
Ch: event.Rune(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue