MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / removeCustomAppFromApps

Function removeCustomAppFromApps

src/DisplayManager.cpp:362–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362void removeCustomAppFromApps(const String &name, bool setApps)
363{
364 // Remove apps from Apps list
365 auto it = Apps.begin();
366 while (it != Apps.end())
367 {
368 if (it->first.startsWith(name))
369 {
370 it = Apps.erase(it);
371 }
372 else
373 {
374 ++it;
375 }
376 }
377
378 // Remove apps from customApps map
379 auto mapIt = customApps.begin();
380 while (mapIt != customApps.end())
381 {
382 if (mapIt->first.startsWith(name))
383 {
384 mapIt = customApps.erase(mapIt);
385 }
386 else
387 {
388 ++mapIt;
389 }
390 }
391
392 if (setApps)
393 ui->setApps(Apps);
394 DisplayManager.getInstance().setAutoTransition(true);
395 deleteCustomAppFile(name);
396 DisplayManager.setAppTime(TIME_PER_APP);
397}
398
399bool parseFragmentsText(const JsonArray &fragmentArray, std::vector<uint32_t> &colors, std::vector<String> &fragments, uint32_t standardColor)
400{

Callers 2

parseCustomPageMethod · 0.85
checkLifetimeFunction · 0.85

Calls 6

deleteCustomAppFileFunction · 0.85
eraseMethod · 0.80
setAppsMethod · 0.80
setAutoTransitionMethod · 0.80
setAppTimeMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected