| 697 | } |
| 698 | |
| 699 | void FloatControllerPanel::UpdateStatus(const MsgClientFloatControllerPanelUpdate& msg) { |
| 700 | if (MsgClientFloatControllerPanelUpdate::EUpdate::kAudioStatus == msg.update_type_) { |
| 701 | auto settings = Settings::Instance(); |
| 702 | if (settings->IsAudioEnabled()) { |
| 703 | audio_btn_->SwitchToSelectedState(); |
| 704 | } |
| 705 | else { |
| 706 | audio_btn_->SwitchToNormalState(); |
| 707 | } |
| 708 | } |
| 709 | else if (MsgClientFloatControllerPanelUpdate::EUpdate::kMediaRecordStatus == msg.update_type_) { |
| 710 | bool res = context_->GetRecording(); |
| 711 | if (res) { |
| 712 | media_record_lab_->setText(tcTr("id_stop_recording")); |
| 713 | } |
| 714 | else { |
| 715 | media_record_lab_->setText(tcTr("id_screen_recording")); |
| 716 | } |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | void FloatControllerPanel::SetMainControl() { |
| 721 | is_main_control_ = true; |
nothing calls this directly
no test coverage detected