Skip to content

Commit

Permalink
Notifications(Manager): add curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroBurner committed Jun 19, 2022
1 parent d961ffd commit d742e6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/ble/NotificationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ NotificationManager::Notification NotificationManager::GetPrevious(NotificationM
}

void NotificationManager::Dismiss(NotificationManager::Notification::Id idx) {
if (this->IsEmpty())
if (this->IsEmpty()) {
return;
}
if (idx >= size_) {
assert(false);
return; // this should not happen
Expand Down
3 changes: 2 additions & 1 deletion src/displayapp/screens/Notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
}

validDisplay = true;
if (currentId > 0)
if (currentId > 0) {
--currentId;
}
currentItem.reset(nullptr);
app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up);
currentItem = std::make_unique<NotificationItem>(nextNotification.Title(),
Expand Down

0 comments on commit d742e6a

Please sign in to comment.