summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Screen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Screen.h')
-rw-r--r--src/displayapp/screens/Screen.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h
index 30de2adc..0a5588b1 100644
--- a/src/displayapp/screens/Screen.h
+++ b/src/displayapp/screens/Screen.h
@@ -14,8 +14,12 @@ namespace Pinetime {
DirtyValue() = default; // Use NSDMI
explicit DirtyValue(T const& v) : value {v} {
} // Use MIL and const-lvalue-ref
- bool IsUpdated() const {
- return isUpdated;
+ bool IsUpdated() {
+ if (this->isUpdated) {
+ this->isUpdated = false;
+ return true;
+ }
+ return false;
}
T const& Get() {
this->isUpdated = false;