26 lines
428 B
Go
26 lines
428 B
Go
package desktop
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/Apale7/opencode-provider-switch/internal/app"
|
|
)
|
|
|
|
// Notifier is the future native notification adapter.
|
|
type Notifier struct {
|
|
service *app.Service
|
|
ctx context.Context
|
|
}
|
|
|
|
func NewNotifier(service *app.Service) *Notifier {
|
|
return &Notifier{service: service}
|
|
}
|
|
|
|
func (n *Notifier) Attach(ctx context.Context) {
|
|
n.ctx = ctx
|
|
}
|
|
|
|
func (n *Notifier) Detach() {
|
|
n.ctx = nil
|
|
}
|