diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-02-06 16:56:05 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-02-06 16:56:05 +0200 |
| commit | 0ffeb67a3c447dc2af16844a08585568c3008b11 (patch) | |
| tree | f180bbf7f77568ae6dea8ba7afa9e49cc3beca59 | |
| parent | 242add420da163223405650c6509e48a2aea4433 (diff) | |
User signals now support not selecting any signal (which is the default
on start to avoid "insta-reading" messages of the top isgnal)
| -rw-r--r-- | internal/client/ui/core/chat/chat.go | 2 | ||||
| -rw-r--r-- | internal/client/ui/core/signallist/signallist.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/client/ui/core/chat/chat.go b/internal/client/ui/core/chat/chat.go index 37fc1a8..5764d45 100644 --- a/internal/client/ui/core/chat/chat.go +++ b/internal/client/ui/core/chat/chat.go @@ -710,7 +710,7 @@ func (m *Model) sendMessage() tea.Cmd { } func (m *Model) SetReceiver(receiverIndex int) tea.Cmd { - if m.receiverIndex == receiverIndex { + if m.receiverIndex == receiverIndex && m.frequencyIndex == -1 { return nil } m.ResetBeforeSwitch() diff --git a/internal/client/ui/core/signallist/signallist.go b/internal/client/ui/core/signallist/signallist.go index 3036017..3ae664e 100644 --- a/internal/client/ui/core/signallist/signallist.go +++ b/internal/client/ui/core/signallist/signallist.go @@ -234,7 +234,7 @@ func (m *Model) Index() int { } func (m *Model) SetIndex(index int) { - m.index = min(max(index, 0), len(m.Signals())-1) + m.index = min(max(index, -1), len(m.Signals())-1) if m.index < m.base { m.base = max(m.index, 0) } else if m.index >= m.base+m.height { |
