2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added label to call panel when recipient has low level of battery.

This commit is contained in:
23rd
2024-03-21 21:03:21 +03:00
parent 88dab47d2c
commit cb9adad660
5 changed files with 147 additions and 13 deletions

View File

@@ -982,6 +982,16 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
updateRemoteMediaState(audio, video);
});
},
.remoteBatteryLevelIsLowUpdated = [=](bool isLow) {
#ifdef _DEBUG
isLow = true;
#endif
crl::on_main(weak, [=] {
_remoteBatteryState = isLow
? RemoteBatteryState::Low
: RemoteBatteryState::Normal;
});
},
.signalingDataEmitted = [=](const std::vector<uint8_t> &data) {
const auto bytes = QByteArray(
reinterpret_cast<const char*>(data.data()),