BLE Tx App / BLE Rx Filtering. (#1543)

BLE TX app creation
BLE RX and TX app improvements
This commit is contained in:
Netro 2023-11-01 06:46:41 -04:00 committed by GitHub
parent 62307b93d7
commit dceb7255b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1402 additions and 34 deletions

View file

@ -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;