Fix author warnings dialog thread
This commit is contained in:
parent
9315a793ba
commit
1b1657bc21
|
|
@ -1013,15 +1013,27 @@ func (s *appState) startAuthorGeneration() {
|
||||||
}
|
}
|
||||||
|
|
||||||
warnings := authorWarnings(s)
|
warnings := authorWarnings(s)
|
||||||
|
uiCall := func(fn func()) {
|
||||||
|
app := fyne.CurrentApp()
|
||||||
|
if app != nil && app.Driver() != nil {
|
||||||
|
app.Driver().DoFromGoroutine(fn, false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fn()
|
||||||
|
}
|
||||||
continuePrompt := func() {
|
continuePrompt := func() {
|
||||||
s.promptAuthorOutput(paths, region, aspect, title)
|
uiCall(func() {
|
||||||
|
s.promptAuthorOutput(paths, region, aspect, title)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if len(warnings) > 0 {
|
if len(warnings) > 0 {
|
||||||
dialog.ShowConfirm("Authoring Notes", strings.Join(warnings, "\n")+"\n\nContinue?", func(ok bool) {
|
uiCall(func() {
|
||||||
if ok {
|
dialog.ShowConfirm("Authoring Notes", strings.Join(warnings, "\n")+"\n\nContinue?", func(ok bool) {
|
||||||
continuePrompt()
|
if ok {
|
||||||
}
|
continuePrompt()
|
||||||
}, s.window)
|
}
|
||||||
|
}, s.window)
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user