MCPcopy Create free account
hub / github.com/audacity/audacity / NewFieldRegistered

Method NewFieldRegistered

libraries/lib-project/ProjectStatus.cpp:141–165  ·  view source on GitHub ↗

This method is always called from the main thread

Source from the content-addressed store, hash-verified

139
140 // This method is always called from the main thread
141 void NewFieldRegistered(const StatusBarField& identifier)
142 {
143 mCallEnqueued = true;
144 mNewFields.push_back(identifier);
145
146 AppEvents::OnAppInitialized(
147 [this]
148 {
149 if (mCallEnqueued)
150 {
151 BasicUI::CallAfter(
152 [this]
153 {
154 for (auto& project : AllProjects {})
155 {
156 for (const auto& field : mNewFields)
157 Dispatch(*project, field);
158 }
159
160 mNewFields.clear();
161 mCallEnqueued = false;
162 });
163 }
164 });
165 }
166
167private:
168 std::vector<StatusBarField> mNewFields;

Callers 1

StatusBarFieldItemMethod · 0.80

Calls 5

OnAppInitializedFunction · 0.85
CallAfterFunction · 0.85
DispatchFunction · 0.50
push_backMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected