Implement unsafe icon cache diagnostics (T-611)
This commit is contained in:
@@ -33,7 +33,7 @@ type AppShell struct {
|
||||
iconReferences map[string]string
|
||||
iconRequests map[string]application.IconEventIdentity
|
||||
iconApplied map[string]application.IconEventIdentity
|
||||
iconFailures map[string]application.IconFailureCode
|
||||
iconFailures map[string]iconFailureState
|
||||
lastRendered int
|
||||
detailRendered bool
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func NewAppShell(
|
||||
iconReferences: make(map[string]string),
|
||||
iconRequests: make(map[string]application.IconEventIdentity),
|
||||
iconApplied: make(map[string]application.IconEventIdentity),
|
||||
iconFailures: make(map[string]application.IconFailureCode),
|
||||
iconFailures: make(map[string]iconFailureState),
|
||||
}
|
||||
shell.search.SingleLine = true
|
||||
shell.SetItems(items)
|
||||
@@ -82,7 +82,7 @@ func (shell *AppShell) SetItems(items []application.CatalogListItem) {
|
||||
nextReferences := make(map[string]string, len(items))
|
||||
nextRequests := make(map[string]application.IconEventIdentity, len(items))
|
||||
nextApplied := make(map[string]application.IconEventIdentity, len(items))
|
||||
nextFailures := make(map[string]application.IconFailureCode, len(items))
|
||||
nextFailures := make(map[string]iconFailureState, len(items))
|
||||
for _, item := range items {
|
||||
controls := shell.rows[item.ID]
|
||||
if controls == nil {
|
||||
@@ -101,7 +101,8 @@ func (shell *AppShell) SetItems(items []application.CatalogListItem) {
|
||||
if applied, exists := shell.iconApplied[item.ID]; exists && applied.Reference == reference {
|
||||
nextApplied[item.ID] = applied
|
||||
}
|
||||
if failure, exists := shell.iconFailures[item.ID]; exists {
|
||||
if failure, exists := shell.iconFailures[item.ID]; exists &&
|
||||
failure.Identity.Reference == reference {
|
||||
nextFailures[item.ID] = failure
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user