summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-02-14 14:19:46 +0100
committerJean-François Milants <jf@codingfield.com>2021-02-14 14:19:46 +0100
commit07a0d7cf2de8244e481df697ebd9c85eb413163f (patch)
tree983bd7fb1780c433aa12331377e67ced9b46b3a8 /src/displayapp/screens
parent4c3803450e33e321dd2f90bdf62b9abe99f1e491 (diff)
parent5fdfb2112e2f6413c4d01c74dd04492e27a6d406 (diff)
Merge branch 'jlukanc1-upstream-dev' into develop
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/Notifications.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 7ca91cfb..c09562f3 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -41,7 +41,6 @@ Notifications::Notifications(DisplayApp *app,
style_line.line.width = 3;
style_line.line.rounded = 0;
-
timeoutLine = lv_line_create(lv_scr_act(), nullptr);
lv_line_set_style(timeoutLine, LV_LINE_STYLE_MAIN, &style_line);
lv_line_set_points(timeoutLine, timeoutLinePoints, 2);
@@ -119,6 +118,10 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
alertNotificationService));
}
return true;
+ case Pinetime::Applications::TouchEvents::LongTap: {
+ notificationManager.ToggleVibrations();
+ return true;
+ }
default:
return false;
}
@@ -135,7 +138,7 @@ namespace {
auto* item = static_cast<Notifications::NotificationItem *>(obj->user_data);
item->OnAcceptIncomingCall(event);
}
-
+
static void MuteIncomingCallEventHandler(lv_obj_t *obj, lv_event_t event) {
auto* item = static_cast<Notifications::NotificationItem *>(obj->user_data);
item->OnMuteIncomingCall(event);
@@ -247,7 +250,7 @@ Notifications::NotificationItem::NotificationItem(const char *title,
lv_obj_align(bt_reject, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 0, -20);
label_reject = lv_label_create(bt_reject, nullptr);
lv_label_set_text(label_reject, Symbols::phoneSlash);
-
+
bt_mute = lv_btn_create(container1, nullptr);
bt_mute->user_data = this;
lv_obj_set_event_cb(bt_mute, MuteIncomingCallEventHandler);