@@ -11,6 +11,7 @@ extern lv_font_t jetbrains_mono_bold_20;
1111Notifications::Notifications (DisplayApp* app,
1212 Pinetime::Controllers::NotificationManager& notificationManager,
1313 Pinetime::Controllers::AlertNotificationService& alertNotificationService,
14+ Pinetime::Controllers::MotorController& motorController,
1415 Modes mode)
1516 : Screen(app), notificationManager {notificationManager}, alertNotificationService {alertNotificationService}, mode {mode} {
1617 notificationManager.ClearNewNotificationFlag ();
@@ -35,16 +36,21 @@ Notifications::Notifications(DisplayApp* app,
3536 alertNotificationService);
3637 }
3738
38- if (mode == Modes::Preview && notification.category != Controllers::NotificationManager::Categories::IncomingCall) {
39- timeoutLine = lv_line_create (lv_scr_act (), nullptr );
39+ if (mode == Modes::Preview) {
40+ if (notification.category == Controllers::NotificationManager::Categories::IncomingCall) {
41+ motorController.StartRinging ();
42+ } else {
43+ motorController.RunForDuration (35 );
44+ timeoutLine = lv_line_create (lv_scr_act (), nullptr );
4045
41- lv_obj_set_style_local_line_width (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3 );
42- lv_obj_set_style_local_line_color (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
43- lv_obj_set_style_local_line_rounded (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true );
46+ lv_obj_set_style_local_line_width (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3 );
47+ lv_obj_set_style_local_line_color (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
48+ lv_obj_set_style_local_line_rounded (timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true );
4449
45- lv_line_set_points (timeoutLine, timeoutLinePoints, 2 );
46- timeoutTickCountStart = xTaskGetTickCount ();
47- timeoutTickCountEnd = timeoutTickCountStart + (5 * 1024 );
50+ lv_line_set_points (timeoutLine, timeoutLinePoints, 2 );
51+ timeoutTickCountStart = xTaskGetTickCount ();
52+ timeoutTickCountEnd = timeoutTickCountStart + (5 * 1024 );
53+ }
4854 }
4955}
5056
@@ -68,8 +74,9 @@ bool Notifications::Refresh() {
6874}
6975
7076bool Notifications::OnTouchEvent (Pinetime::Applications::TouchEvents event) {
71- if (mode != Modes::Normal)
72- return true ;
77+ if (mode != Modes::Normal) {
78+ return false ;
79+ }
7380
7481 switch (event) {
7582 case Pinetime::Applications::TouchEvents::SwipeDown: {
0 commit comments