Fix. Do not send resolutions on file transfer conn (#6748)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-12-25 16:47:40 +08:00 committed by GitHub
parent f7f2d84e1f
commit fc0fc5ea10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1172,6 +1172,11 @@ impl Connection {
..Default::default()
})
.into();
let mut sub_service = false;
if self.file_transfer.is_some() {
res.set_peer_info(pi);
} else {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{
pi.resolutions = Some(SupportedResolutions {
@ -1188,10 +1193,6 @@ impl Connection {
.into();
}
let mut sub_service = false;
if self.file_transfer.is_some() {
res.set_peer_info(pi);
} else {
try_activate_screen();
if let Some(msg_out) = super::video_service::is_inited_msg() {
self.send(msg_out).await;
@ -3200,12 +3201,12 @@ fn start_wakelock_thread() -> std::sync::mpsc::Sender<(usize, usize)> {
log::info!("drop wakelock");
} else {
let mut display = remote_count > 0;
if let Some(w) = wakelock.as_mut() {
if let Some(_w) = wakelock.as_mut() {
if display != last_display {
#[cfg(any(target_os = "windows", target_os = "macos"))]
{
log::info!("set wakelock display to {display}");
if let Err(e) = w.set_display(display) {
if let Err(e) = _w.set_display(display) {
log::error!(
"failed to set wakelock display to {display}: {e:?}"
);