mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-03 20:47:43 +08:00
[feat] add privacy unlock controls and remote relocking
This commit is contained in:
@@ -316,6 +316,12 @@ void PeerEventHandler::OnReceiveDataBuffer(
|
||||
std::lock_guard lock(props->privacy_status_mutex_);
|
||||
if (!props->privacy_status_received_ ||
|
||||
static_cast<int32_t>(remote_action.ps.revision - props->privacy_status_.revision) >= 0) {
|
||||
if (props->privacy_status_received_ &&
|
||||
static_cast<int32_t>(remote_action.ps.local_unlock_revision -
|
||||
props->privacy_status_.local_unlock_revision) > 0)
|
||||
props->privacy_unlock_notice_ = true;
|
||||
if (remote_action.ps.state == PrivacyState::on)
|
||||
props->privacy_unlock_notice_ = false;
|
||||
props->privacy_status_ = remote_action.ps;
|
||||
props->privacy_status_received_ = true;
|
||||
props->privacy_status_tick_ = SDL_GetTicks();
|
||||
|
||||
Reference in New Issue
Block a user