Improve casting resume behavior
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 15m49s

This commit is contained in:
MassiveBox 2025-06-07 22:43:22 +02:00
parent 150348c391
commit 4cf9a2a58f
Signed by: massivebox
GPG key ID: 9B74D3A59181947D
3 changed files with 57 additions and 11 deletions

View file

@ -18,10 +18,29 @@ type View struct {
Controller *Controller
Window fyne.Window
CastingScreenElements CastingScreenElements
ReconnectingDialog *dialog.CustomDialog
}
func (v *View) PopupError(err error) {
dialog.ShowError(err, v.Window)
fyne.Do(func() {
dialog.ShowError(err, v.Window)
})
}
func (v *View) PopupReconnecting(show bool) {
if v.ReconnectingDialog != nil && !show {
fyne.DoAndWait(func() {
v.ReconnectingDialog.Dismiss()
v.ReconnectingDialog = nil
})
return
}
if v.ReconnectingDialog == nil && show {
v.ReconnectingDialog = dialog.NewCustomWithoutButtons("Reconnecting to stream...", widget.NewProgressBarInfinite(), v.Window)
fyne.Do(func() {
v.ReconnectingDialog.Show()
})
}
}
func NewView(controller *Controller) *View {