File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ func NewSpeakerNotes(rootSlide *Slide) SpeakerNotesModel {
78
78
}
79
79
80
80
// Create buffered channel for slide changes
81
- slideChangeChan := make (chan int , 10 )
81
+ slideChangeChan := make (chan int )
82
82
83
83
return SpeakerNotesModel {
84
84
currentSlide : 0 ,
@@ -123,10 +123,7 @@ func (m SpeakerNotesModel) listenForSlideChangesWithReconnect() {
123
123
m .syncClient .ListenForSlideChanges (m .slideChangeChan )
124
124
125
125
// If we reach here, the connection was lost
126
- select {
127
- case m .slideChangeChan <- - 1 :
128
- default :
129
- }
126
+ m .slideChangeChan <- - 1
130
127
}
131
128
132
129
func (m SpeakerNotesModel ) attemptReconnect () tea.Cmd {
Original file line number Diff line number Diff line change @@ -137,11 +137,7 @@ func (c *SyncClient) ListenForSlideChanges(slideChangeChan chan<- int) {
137
137
if strings .HasPrefix (line , "SLIDE:" ) {
138
138
slideNumStr := strings .TrimPrefix (line , "SLIDE:" )
139
139
if slideNum , err := strconv .Atoi (slideNumStr ); err == nil {
140
- select {
141
- case slideChangeChan <- slideNum :
142
- default :
143
- // Channel is full, skip this update
144
- }
140
+ slideChangeChan <- slideNum
145
141
}
146
142
}
147
143
}
You can’t perform that action at this time.
0 commit comments