mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 15:11:02 +00:00
fix some glitchiness caused by indeterminate sorting
This commit is contained in:
parent
60df208924
commit
b6b5373999
3 changed files with 9 additions and 8 deletions
|
|
@ -35,7 +35,6 @@ type Container struct {
|
|||
ProjectName string
|
||||
ID string
|
||||
Container types.Container
|
||||
DisplayString string
|
||||
Client *client.Client
|
||||
OSCommand *OSCommand
|
||||
Config *config.AppConfig
|
||||
|
|
@ -140,11 +139,6 @@ func (c *Container) GetDisplayCPUPerc() string {
|
|||
return utils.ColoredString(formattedPercentage, clr)
|
||||
}
|
||||
|
||||
// ProducingLogs tells us whether we should bother checking a container's logs
|
||||
func (c *Container) ProducingLogs() bool {
|
||||
return c.Container.State == "running" && c.DetailsLoaded() && c.Details.HostConfig.LogConfig.Type != "none"
|
||||
}
|
||||
|
||||
// GetColor Container color
|
||||
func (c *Container) GetColor() color.Attribute {
|
||||
switch c.Container.State {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,15 @@ func (gui *Gui) getImagesPanel() *SideListPanel[*commands.Image] {
|
|||
return true
|
||||
}
|
||||
|
||||
return a.Name < b.Name
|
||||
if a.Name != b.Name {
|
||||
return a.Name < b.Name
|
||||
}
|
||||
|
||||
if a.Tag != b.Tag {
|
||||
return a.Tag < b.Tag
|
||||
}
|
||||
|
||||
return a.ID < b.ID
|
||||
},
|
||||
getDisplayStrings: func(image *commands.Image) []string {
|
||||
return []string{image.Name, image.Tag, utils.FormatDecimalBytes(int(image.Image.Size))}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ type IGui interface {
|
|||
FocusY(selectedLine int, itemCount int, view *gocui.View)
|
||||
ShouldRefresh(key string) bool
|
||||
GetMainView() *gocui.View
|
||||
PopupPanelFocused() bool
|
||||
// TODO: replace with IsCurrentView() bool
|
||||
CurrentView() *gocui.View
|
||||
FilterString(view *gocui.View) string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue