Implement catalog startup diagnostics (T-616)
This commit is contained in:
@@ -34,6 +34,7 @@ type AppShell struct {
|
||||
iconRequests map[string]application.IconEventIdentity
|
||||
iconApplied map[string]application.IconEventIdentity
|
||||
iconFailures map[string]iconFailureState
|
||||
catalogState catalogPresentationState
|
||||
lastRendered int
|
||||
detailRendered bool
|
||||
}
|
||||
@@ -58,6 +59,9 @@ func NewAppShell(
|
||||
}
|
||||
shell.search.SingleLine = true
|
||||
shell.SetItems(items)
|
||||
if len(items) == 0 {
|
||||
shell.catalogState = catalogStateLoading
|
||||
}
|
||||
return shell
|
||||
}
|
||||
|
||||
@@ -76,6 +80,7 @@ func (shell *AppShell) ApplyIcon(appID string, icon image.Image) {
|
||||
// SetItems applies a prepared, IO-free catalog/status snapshot.
|
||||
func (shell *AppShell) SetItems(items []application.CatalogListItem) {
|
||||
shell.model.SetItems(items)
|
||||
shell.catalogState = catalogStateReady
|
||||
|
||||
nextRows := make(map[string]*rowControls, len(items))
|
||||
nextIcons := make(map[string]paint.ImageOp, len(items))
|
||||
@@ -146,7 +151,7 @@ func (shell *AppShell) Layout(gtx layout.Context, theme *material.Theme) layout.
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
label := material.Caption(
|
||||
theme,
|
||||
shell.edition+" · Legacy · Windows 7 SP1 x64",
|
||||
shell.catalogStatusText()+" · "+shell.edition+" · Legacy · Windows 7 SP1 x64",
|
||||
)
|
||||
label.Color = shellColors.secondary
|
||||
return label.Layout(gtx)
|
||||
|
||||
Reference in New Issue
Block a user