mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 15:02:41 +00:00
Remove legacy function renderMessageContent
This commit is contained in:
parent
3e3f03c78d
commit
04c7720f4b
@ -785,25 +785,6 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
|
||||
return rowHeights;
|
||||
}
|
||||
|
||||
void renderMessageContent(OLEDDisplay *display, const std::vector<std::string> &lines, const std::vector<int> &rowHeights, int x,
|
||||
int yOffset, int scrollBottom, const Emote *emotes, int numEmotes, bool isInverted, bool isBold)
|
||||
{
|
||||
for (size_t i = 0; i < lines.size(); ++i) {
|
||||
int lineY = yOffset;
|
||||
for (size_t j = 0; j < i; ++j)
|
||||
lineY += rowHeights[j];
|
||||
if (lineY > -rowHeights[i] && lineY < scrollBottom) {
|
||||
if (i == 0 && isInverted) {
|
||||
display->drawString(x, lineY, lines[i].c_str());
|
||||
if (isBold)
|
||||
display->drawString(x, lineY, lines[i].c_str());
|
||||
} else {
|
||||
drawStringWithEmotes(display, x, lineY, lines[i], emotes, numEmotes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void handleNewMessage(const StoredMessage &sm, const meshtastic_MeshPacket &packet)
|
||||
{
|
||||
if (packet.from != 0) {
|
||||
|
||||
@ -47,10 +47,6 @@ std::vector<std::string> generateLines(OLEDDisplay *display, const char *headerS
|
||||
std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, const Emote *emotes,
|
||||
const std::vector<bool> &isHeaderVec);
|
||||
|
||||
// Function to render the message content
|
||||
void renderMessageContent(OLEDDisplay *display, const std::vector<std::string> &lines, const std::vector<int> &rowHeights, int x,
|
||||
int yOffset, int scrollBottom, const Emote *emotes, int numEmotes, bool isInverted, bool isBold);
|
||||
|
||||
// Reset scroll state when new messages arrive
|
||||
void resetScrollState();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user