Skip to content

Commit

Permalink
fix: dock bluetooth module is missing
Browse files Browse the repository at this point in the history
dock depends dde-session-daemon bluetooth adapter add signal to show
bluetooth module

Log:
(cherry picked from commit a46ed1c)
  • Loading branch information
dengbo11 authored and fly602 committed Sep 4, 2024
1 parent 1050911 commit 375d165
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bluetooth1/bluetooth.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,18 @@ func (b *Bluetooth) init() {
b.adapters.mu.Lock()
b.adapters.infos = adapterInfos
b.adapters.mu.Unlock()
for _, adapterInfo := range adapterInfos {
data, err := json.Marshal(adapterInfo)
if err != nil {
logger.Warning(err)
continue
}
err = b.service.Emit(b, "AdapterAdded", string(data))
if err != nil {
logger.Warning(err)
continue
}
}
} else {
logger.Warning(err)
}
Expand Down

0 comments on commit 375d165

Please sign in to comment.