فهرست منبع

PTT: improved disconnect notification

Roman Belyakovsky 2 سال پیش
والد
کامیت
7dab4d921c
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      base_pack/hid_app/views/hid_ptt.c

+ 2 - 2
base_pack/hid_app/views/hid_ptt.c

@@ -686,9 +686,9 @@ void hid_ptt_set_connected_status(HidPushToTalk* hid_ptt, bool connected) {
     furi_assert(hid_ptt);
     with_view_model(
         hid_ptt->view, HidPushToTalkModel * model, {
-            model->connected = connected;
-            if (!connected) {
+            if (!connected && model->connected) {
                 notification_message(hid_ptt->hid->notifications, &sequence_single_vibro);
             }
+            model->connected = connected;
         }, true);
 }