MCPcopy
hub / github.com/jesseduffield/lazygit / OnUIThread

Method OnUIThread

pkg/gui/types/common.go:73–73  ·  view source on GitHub ↗

Runs the given function on the UI thread (this is for things like showing a popup asking a user for input). Only necessary to call if you're not already on the UI thread i.e. you're inside a goroutine. All controller handlers are executed on the UI thread.

(f func() error)

Source from the content-addressed store, hash-verified

71 // Only necessary to call if you're not already on the UI thread i.e. you're inside a goroutine.
72 // All controller handlers are executed on the UI thread.
73 OnUIThread(f func() error)
74 // Like OnUIThread, but signals that the callback only modifies view
75 // content (e.g. spinner), allows the event loop to skip
76 // the expensive layout recalculation when only content changed.

Callers 15

renderMethod · 0.65
showIntroPopupMessageMethod · 0.65
toggleForPatchMethod · 0.65
openSearchMethod · 0.65
handleGotoBottomMethod · 0.65
pushMethod · 0.65
ExplodeMethod · 0.65
RefreshMethod · 0.65
refreshBranchesMethod · 0.65
refreshStateFilesMethod · 0.65

Implementers 1

guiCommonpkg/gui/gui_common.go

Calls

no outgoing calls

Tested by

no test coverage detected