mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 17:18:06 +00:00
BLE Tx App / BLE Rx Filtering. (#1543)
BLE TX app creation BLE RX and TX app improvements
This commit is contained in:
@@ -95,6 +95,20 @@ void sortEntriesBy(ContainerType& entries, KeySelector keySelector, SortOrder as
|
||||
});
|
||||
}
|
||||
|
||||
template <typename ContainerType, typename KeySelector>
|
||||
void removeEntriesWithoutKey(ContainerType& entries, ContainerType& filteredEntries, KeySelector keySelector) {
|
||||
// Clear the filteredEntries container
|
||||
filteredEntries.clear();
|
||||
|
||||
auto it = entries.begin();
|
||||
while (it != entries.end()) {
|
||||
if (!keySelector(*it)) {
|
||||
filteredEntries.emplace_back(*it); // Add a new entry to filteredEntries
|
||||
}
|
||||
++it; // Move to the next element, outside of the if block
|
||||
}
|
||||
}
|
||||
|
||||
namespace ui {
|
||||
|
||||
using RecentEntriesColumn = std::pair<std::string, size_t>;
|
||||
@@ -279,6 +293,10 @@ class RecentEntriesView : public View {
|
||||
_table.focus();
|
||||
}
|
||||
|
||||
void set_table(Entries& new_table) {
|
||||
_table = new_table;
|
||||
}
|
||||
|
||||
private:
|
||||
RecentEntriesHeader _header;
|
||||
RecentEntriesTable<Entries> _table;
|
||||
|
Reference in New Issue
Block a user