Skip to content

Commit

Permalink
Fix autoloaded plugin name trailing space
Browse files Browse the repository at this point in the history
  • Loading branch information
danngreen committed Dec 28, 2024
1 parent 3d20e9b commit 42ec0b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firmware/src/gui/pages/plugin_tab.hh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once
#include "gui/helpers/lv_helpers.hh"
#include "gui/pages/base.hh"
#include "gui/pages/page_list.hh"
#include "gui/pages/plugin_popup.hh"
#include "gui/pages/system_menu_tab_base.hh"
#include "gui/slsexport/meta5/ui.h"
Expand Down Expand Up @@ -206,6 +205,9 @@ private:
if (auto colorpos = plugin_name.find_first_of("^"); colorpos != std::string::npos) {
plugin_name = plugin_name.substr(0, colorpos);
}
//trim
while (plugin_name.back() == ' ')
plugin_name.pop_back();

const auto is_autoloaded = std::ranges::find(page->settings.slug, plugin_name) != page->settings.slug.end();

Expand Down

0 comments on commit 42ec0b4

Please sign in to comment.