summaryrefslogtreecommitdiff
path: root/internal/client
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-02-06 16:56:05 +0200
committerKyren223 <Kyren223@proton.me>2025-02-06 16:56:05 +0200
commit0ffeb67a3c447dc2af16844a08585568c3008b11 (patch)
treef180bbf7f77568ae6dea8ba7afa9e49cc3beca59 /internal/client
parent242add420da163223405650c6509e48a2aea4433 (diff)
User signals now support not selecting any signal (which is the default
on start to avoid "insta-reading" messages of the top isgnal)
Diffstat (limited to 'internal/client')
-rw-r--r--internal/client/ui/core/chat/chat.go2
-rw-r--r--internal/client/ui/core/signallist/signallist.go2
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 {