Skip to content

UpdateingImage: allow empty command line#6

Open
jinliu wants to merge 1 commit into
noctalia-dev:mainfrom
jinliu:fix/updating-image-empty-cmdline
Open

UpdateingImage: allow empty command line#6
jinliu wants to merge 1 commit into
noctalia-dev:mainfrom
jinliu:fix/updating-image-empty-cmdline

Conversation

@jinliu
Copy link
Copy Markdown
Contributor

@jinliu jinliu commented May 31, 2026

It will assume that the image is updated by some external process, and only auto-reload it.

It will assume that the image is updated by some external process, and
only periodically reload it.
Copilot AI review requested due to automatic review settings May 31, 2026 03:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a fast-path for when commandLine is not configured, ensuring the widget displays a static image without invoking async execution.

Changes:

  • Early-return in update() when commandLine is nil/empty
  • Set the widget image once in the no-command case

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +80 to +86
if not commandLine or commandLine == "" then
if not imageSet then
barWidget.setImage(imagePath, true, imageWidth, imageHeight)
imageSet = true
end
return
end
local imageSet = false

function update()
if not commandLine or commandLine == "" then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants