Skip to content

Commit 3fb7c0e

Browse files
authored
update to new protobufs (is_muted) (#223)
1 parent a6d5bd1 commit 3fb7c0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/graphics/TFT/TFTView_320x240.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,8 @@ void TFTView_320x240::ui_event_ChannelButton(lv_event_t *e)
11081108
} else if (event_code == LV_EVENT_LONG_PRESSED) {
11091109
// toggle mute channel
11101110
uint8_t ch = (uint8_t)(unsigned long)e->user_data;
1111-
bool mute = THIS->db.channel[ch].settings.mute;
1112-
THIS->db.channel[ch].settings.mute = !mute;
1111+
bool mute = THIS->db.channel[ch].settings.module_settings.is_muted;
1112+
THIS->db.channel[ch].settings.module_settings.is_muted = !mute;
11131113
THIS->updateChannelConfig(THIS->db.channel[ch]);
11141114
THIS->controller->sendConfig(THIS->db.channel[ch], THIS->ownNode);
11151115
ignoreClicked = true;
@@ -5842,7 +5842,7 @@ void TFTView_320x240::updateGroupChannel(uint8_t chId)
58425842
objects.channel_button6, objects.channel_button7};
58435843

58445844
lv_obj_t *bellImage = lv_obj_get_child(btn[chId], 2);
5845-
if (db.channel[chId].settings.mute) {
5845+
if (db.channel[chId].settings.module_settings.is_muted) {
58465846
lv_obj_set_style_img_recolor(bellImage, lv_color_hex(0xffab0000), LV_PART_MAIN | LV_STATE_DEFAULT);
58475847
lv_image_set_src(bellImage, &img_groups_bell_slash_image);
58485848
} else {
@@ -6359,7 +6359,8 @@ void TFTView_320x240::newMessage(uint32_t from, uint32_t to, uint8_t ch, const c
63596359
if (container != activeMsgContainer || activePanel != objects.messages_panel) {
63606360
unreadMessages++;
63616361
updateUnreadMessages();
6362-
if (activePanel != objects.messages_panel && db.uiConfig.alert_enabled && !db.channel[ch].settings.mute) {
6362+
if (activePanel != objects.messages_panel && db.uiConfig.alert_enabled &&
6363+
!db.channel[ch].settings.module_settings.is_muted) {
63636364
showMessagePopup(from, to, ch, lv_label_get_text(nodes[from]->LV_OBJ_IDX(node_lbl_idx)));
63646365
}
63656366
lv_obj_add_flag(container, LV_OBJ_FLAG_HIDDEN);

0 commit comments

Comments
 (0)