Refact/options (#9318)

* refact options

Signed-off-by: fufesou <linlong1266@gmail.com>

* Remove unused msg

Signed-off-by: fufesou <linlong1266@gmail.com>

* web, toggle virtual display

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-09-10 23:54:59 +08:00
committed by GitHub
parent 519539ed0a
commit 9380f33d7c
7 changed files with 14 additions and 49 deletions

View File

@@ -958,22 +958,6 @@ impl<T: InvokeUiSession> Remote<T> {
true
}
async fn send_opts_after_login(&self, peer: &mut Stream) {
if let Some(opts) = self
.handler
.lc
.read()
.unwrap()
.get_option_message_after_login()
{
let mut misc = Misc::new();
misc.set_option(opts);
let mut msg_out = Message::new();
msg_out.set_misc(misc);
allow_err!(peer.send(&msg_out).await);
}
}
async fn send_toggle_virtual_display_msg(&self, peer: &mut Stream) {
if !self.peer_info.is_support_virtual_display() {
return;
@@ -1135,7 +1119,6 @@ impl<T: InvokeUiSession> Remote<T> {
self.first_frame = true;
self.handler.close_success();
self.handler.adapt_size();
self.send_opts_after_login(peer).await;
self.send_toggle_virtual_display_msg(peer).await;
self.send_toggle_privacy_mode_msg(peer).await;
}