Skip to content

Commit af64c83

Browse files
authored
Clean up commented code in App struct
Removed commented-out code related to sender state and settings.
1 parent 00ec12a commit af64c83

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

gui/app.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
type App struct {
2020
ctx context.Context
2121

22-
// Sender state
2322
senderMu sync.Mutex
2423
senderCancel context.CancelFunc
2524
senderPort int
@@ -29,7 +28,6 @@ type App struct {
2928
activeConnMu sync.Mutex
3029
activeConn net.Conn
3130

32-
// Settings
3331
settings Settings
3432
}
3533

@@ -174,13 +172,6 @@ func (a *App) StartSending(filePaths []string) error {
174172
go func() {
175173
opts := transfer.SenderOptions{
176174
AllowConn: func(addr string) bool {
177-
if a.settings.AutoAccept {
178-
wailsRuntime.EventsEmit(a.ctx, "connection:accepted", addr)
179-
return true
180-
}
181-
// Emit event and wait for response
182-
wailsRuntime.EventsEmit(a.ctx, "connection:request", addr)
183-
// For now, auto-accept (proper dialog would need a response channel)
184175
return true
185176
},
186177
PortChan: portChan,
@@ -209,7 +200,6 @@ func (a *App) StartSending(filePaths []string) error {
209200
},
210201
OnError: func(peerAddr string, err error) {
211202
a.clearConn()
212-
// Use the first file name as a reference if it fails early
213203
baseName := "Transfer"
214204
if len(filePaths) > 0 {
215205
baseName = filepath.Base(filePaths[0])

0 commit comments

Comments
 (0)