Make desktop.Start run on main thread (#2475)

This commit is contained in:
WithoutPants
2022-04-05 14:58:08 +10:00
committed by GitHub
parent 61d9f57ce9
commit 230d8f6028
4 changed files with 20 additions and 12 deletions

View File

@@ -8,13 +8,13 @@ import (
const faviconDir = "v2.5/build/"
type FaviconProvider struct {
uiBox embed.FS
UIBox embed.FS
}
func (p *FaviconProvider) GetFavicon() []byte {
if runtime.GOOS == "windows" {
faviconPath := faviconDir + "favicon.ico"
ret, _ := p.uiBox.ReadFile(faviconPath)
ret, _ := p.UIBox.ReadFile(faviconPath)
return ret
}
@@ -23,6 +23,6 @@ func (p *FaviconProvider) GetFavicon() []byte {
func (p *FaviconProvider) GetFaviconPng() []byte {
faviconPath := faviconDir + "favicon.png"
ret, _ := p.uiBox.ReadFile(faviconPath)
ret, _ := p.UIBox.ReadFile(faviconPath)
return ret
}