Skip to content

Commit

Permalink
testing log
Browse files Browse the repository at this point in the history
  • Loading branch information
mverch67 committed Dec 17, 2024
1 parent 94e1943 commit 2936f28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions source/TFTView_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4422,7 +4422,7 @@ void TFTView_320x240::handleTextMessageResponse(uint32_t channelOrNode, const ui
: colorYellow,
LV_PART_MAIN | LV_STATE_DEFAULT);

// TODO: store message
// store message
break;
}
}
Expand Down Expand Up @@ -5027,7 +5027,6 @@ void TFTView_320x240::restoreMessage(const LogMessage &msg)
uint32_t time = msg.time ? msg.time : UINT32_MAX; // don't overwrite 0 with actual time
newMessage(msg.from, msg.to, msg.ch, (const char *)msg.bytes, time);
}
ILOG_DEBUG("restore message done.");
}

/**
Expand Down Expand Up @@ -5143,6 +5142,7 @@ void TFTView_320x240::updateActiveChats(void)
*/
void TFTView_320x240::notifyRestoreMessages(int32_t percentage)
{
ILOG_DEBUG("notifyRestoreMessages: %d%", percentage); // TODO
if (percentage >= 0) {
static char buf[64];
lv_snprintf(buf, sizeof(buf), _("Restoring messages %d%%\n...please wait..."), percentage);
Expand All @@ -5151,6 +5151,7 @@ void TFTView_320x240::notifyRestoreMessages(int32_t percentage)
lv_group_focus_obj(objects.msg_popup_button);
} else {
lv_obj_add_flag(objects.msg_popup_panel, LV_OBJ_FLAG_HIDDEN);
ILOG_DEBUG("notifyRestoreMessages finished");
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/ViewController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ bool ViewController::packetReceived(const meshtastic_MeshPacket &p)
ILOG_DEBUG("loading all logs at once");
int32_t percentage = log.current() * 100 / log.count();
bool showPercentage = false;
if (log.count() > 10 && percentage < 50) { // TODO: was 10
if (log.count() > 2 && percentage < 50) { // TODO: was 10
showPercentage = true;
view->notifyRestoreMessages(percentage);
}
Expand Down

0 comments on commit 2936f28

Please sign in to comment.