mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 10:02:05 +00:00
Scroll on message screen restarts on visit
This commit is contained in:
parent
35d4784c5c
commit
bf9a7d3a7f
@ -1325,6 +1325,14 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
static uint32_t lastTime = 0, scrollStartDelay = 0, pauseStart = 0;
|
static uint32_t lastTime = 0, scrollStartDelay = 0, pauseStart = 0;
|
||||||
static bool waitingToReset = false, scrollStarted = false;
|
static bool waitingToReset = false, scrollStarted = false;
|
||||||
|
|
||||||
|
// === Reset scroll state when entering screen ===
|
||||||
|
if (state->ticksSinceLastStateSwitch == 0) {
|
||||||
|
scrollY = 0;
|
||||||
|
scrollStartDelay = now;
|
||||||
|
lastTime = now;
|
||||||
|
waitingToReset = false;
|
||||||
|
scrollStarted = false;
|
||||||
|
}
|
||||||
// === Smooth scrolling adjustment ===
|
// === Smooth scrolling adjustment ===
|
||||||
// You can tweak this divisor to change how smooth it scrolls.
|
// You can tweak this divisor to change how smooth it scrolls.
|
||||||
// Lower = smoother, but can feel slow.
|
// Lower = smoother, but can feel slow.
|
||||||
|
Loading…
Reference in New Issue
Block a user