| 360 | } |
| 361 | |
| 362 | void 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 | |
| 399 | bool parseFragmentsText(const JsonArray &fragmentArray, std::vector<uint32_t> &colors, std::vector<String> &fragments, uint32_t standardColor) |
| 400 | { |
no test coverage detected