@@ -157,8 +157,10 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
157157 }
158158 currentItem.reset (nullptr );
159159 app->SetFullRefresh (DisplayApp::FullRefreshDirections::RightAnim);
160- // create black "inTransition" screen
161- currentItem = std::make_unique<NotificationItem>(alertNotificationService, motorController, true );
160+ // create black transition screen to let the notification dismiss to blackness
161+ lv_obj_t * blackBox = lv_obj_create (lv_scr_act (), nullptr );
162+ lv_obj_set_size (blackBox, LV_HOR_RES, LV_VER_RES);
163+ lv_obj_set_style_local_bg_color (blackBox, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
162164 dismissingNotification = true ;
163165 return true ;
164166 }
@@ -229,16 +231,14 @@ namespace {
229231}
230232
231233Notifications::NotificationItem::NotificationItem (Pinetime::Controllers::AlertNotificationService& alertNotificationService,
232- Pinetime::Controllers::MotorController& motorController,
233- bool isTransition)
234+ Pinetime::Controllers::MotorController& motorController)
234235 : NotificationItem(" Notification" ,
235236 " No notification to display" ,
236237 0 ,
237238 Controllers::NotificationManager::Categories::Unknown,
238239 0 ,
239240 alertNotificationService,
240- motorController,
241- isTransition) {
241+ motorController) {
242242}
243243
244244Notifications::NotificationItem::NotificationItem (const char * title,
@@ -247,12 +247,8 @@ Notifications::NotificationItem::NotificationItem(const char* title,
247247 Controllers::NotificationManager::Categories category,
248248 uint8_t notifNb,
249249 Pinetime::Controllers::AlertNotificationService& alertNotificationService,
250- Pinetime::Controllers::MotorController& motorController,
251- bool isTransition)
250+ Pinetime::Controllers::MotorController& motorController)
252251 : alertNotificationService {alertNotificationService}, motorController {motorController} {
253- if (isTransition) {
254- return ; // nothing to do, just a black box
255- }
256252 container = lv_cont_create (lv_scr_act (), nullptr );
257253 lv_obj_set_size (container, LV_HOR_RES, LV_VER_RES);
258254 lv_obj_set_style_local_bg_color (container, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
0 commit comments