From 3ee4876214b70c107cabbb54f865e646e99f0d73 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 12 Sep 2021 11:08:25 +0300 Subject: Toggle notifications only, keep vibrations. --- src/displayapp/screens/Notifications.cpp | 4 ---- src/displayapp/screens/settings/QuickSettings.cpp | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/displayapp') diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index 22eb290e..3f20d38a 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -129,10 +129,6 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) { alertNotificationService); } return true; - case Pinetime::Applications::TouchEvents::LongTap: { - // notificationManager.ToggleVibrations(); - return true; - } default: return false; } diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index 22b56360..691c40c8 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -88,7 +88,7 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app, btn3_lvl = lv_label_create(btn3, nullptr); lv_obj_set_style_local_text_font(btn3_lvl, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_sys_48); - if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::ON) { + if (settingsController.GetNotificationStatus() == Controllers::Settings::Notification::ON) { lv_obj_add_state(btn3, LV_STATE_CHECKED); lv_label_set_text_static(btn3_lvl, Symbols::notificationsOn); } else { @@ -142,11 +142,11 @@ void QuickSettings::OnButtonEvent(lv_obj_t* object, lv_event_t event) { } else if (object == btn3 && event == LV_EVENT_VALUE_CHANGED) { if (lv_obj_get_state(btn3, LV_BTN_PART_MAIN) & LV_STATE_CHECKED) { - settingsController.SetVibrationStatus(Controllers::Settings::Vibration::ON); + settingsController.SetNotificationStatus(Controllers::Settings::Notification::ON); motorController.RunForDuration(35); lv_label_set_text_static(btn3_lvl, Symbols::notificationsOn); } else { - settingsController.SetVibrationStatus(Controllers::Settings::Vibration::OFF); + settingsController.SetNotificationStatus(Controllers::Settings::Notification::OFF); lv_label_set_text_static(btn3_lvl, Symbols::notificationsOff); } -- cgit v1.2.3