Improve casting resume behavior
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 15m49s
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 15m49s
This commit is contained in:
parent
150348c391
commit
4cf9a2a58f
3 changed files with 57 additions and 11 deletions
21
app/view.go
21
app/view.go
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue