fix: switch texture, do not input os password (#8178)
* refact: switch texture, do not input os password Signed-off-by: fufesou <linlong1266@gmail.com> * Switch texture, refresh video Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
74d4505b3d
commit
7ca5a0b977
@ -112,6 +112,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
RxBool waitForImageDialogShow = true.obs;
|
RxBool waitForImageDialogShow = true.obs;
|
||||||
Timer? waitForImageTimer;
|
Timer? waitForImageTimer;
|
||||||
RxBool waitForFirstImage = true.obs;
|
RxBool waitForFirstImage = true.obs;
|
||||||
|
bool isRefreshing = false;
|
||||||
|
|
||||||
Rect? get rect => _rect;
|
Rect? get rect => _rect;
|
||||||
bool get isOriginalResolutionSet =>
|
bool get isOriginalResolutionSet =>
|
||||||
@ -392,6 +393,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
Map<String, dynamic> evt, SessionID sessionId, String peerId) {
|
Map<String, dynamic> evt, SessionID sessionId, String peerId) {
|
||||||
parent.target?.imageModel.setUseTextureRender(evt['v'] == 'Y');
|
parent.target?.imageModel.setUseTextureRender(evt['v'] == 'Y');
|
||||||
waitForFirstImage.value = true;
|
waitForFirstImage.value = true;
|
||||||
|
isRefreshing = true;
|
||||||
showConnectedWaitingForImage(parent.target!.dialogManager, sessionId,
|
showConnectedWaitingForImage(parent.target!.dialogManager, sessionId,
|
||||||
'success', 'Successful', kMsgboxTextWaitingForImage);
|
'success', 'Successful', kMsgboxTextWaitingForImage);
|
||||||
}
|
}
|
||||||
@ -677,7 +679,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
);
|
);
|
||||||
waitForImageDialogShow.value = true;
|
waitForImageDialogShow.value = true;
|
||||||
waitForImageTimer = Timer(Duration(milliseconds: 1500), () {
|
waitForImageTimer = Timer(Duration(milliseconds: 1500), () {
|
||||||
if (waitForFirstImage.isTrue) {
|
if (waitForFirstImage.isTrue && !isRefreshing) {
|
||||||
bind.sessionInputOsPassword(sessionId: sessionId, value: '');
|
bind.sessionInputOsPassword(sessionId: sessionId, value: '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -795,6 +797,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
if (displays.isNotEmpty) {
|
if (displays.isNotEmpty) {
|
||||||
_reconnects = 1;
|
_reconnects = 1;
|
||||||
waitForFirstImage.value = true;
|
waitForFirstImage.value = true;
|
||||||
|
isRefreshing = false;
|
||||||
}
|
}
|
||||||
Map<String, dynamic> features = json.decode(evt['features']);
|
Map<String, dynamic> features = json.decode(evt['features']);
|
||||||
_pi.features.privacyMode = features['privacy_mode'] == 1;
|
_pi.features.privacyMode = features['privacy_mode'] == 1;
|
||||||
@ -2348,6 +2351,7 @@ class FFI {
|
|||||||
/// Mobile reuse FFI
|
/// Mobile reuse FFI
|
||||||
void mobileReset() {
|
void mobileReset() {
|
||||||
ffiModel.waitForFirstImage.value = true;
|
ffiModel.waitForFirstImage.value = true;
|
||||||
|
ffiModel.isRefreshing = false;
|
||||||
ffiModel.waitForImageDialogShow.value = true;
|
ffiModel.waitForImageDialogShow.value = true;
|
||||||
ffiModel.waitForImageTimer?.cancel();
|
ffiModel.waitForImageTimer?.cancel();
|
||||||
ffiModel.waitForImageTimer = null;
|
ffiModel.waitForImageTimer = null;
|
||||||
|
@ -473,6 +473,7 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
pub fn use_texture_render_changed(&self) {
|
pub fn use_texture_render_changed(&self) {
|
||||||
self.send(Data::ResetDecoder(None));
|
self.send(Data::ResetDecoder(None));
|
||||||
self.change_prefer_codec();
|
self.change_prefer_codec();
|
||||||
|
self.send(Data::Message(LoginConfigHandler::refresh()));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn restart_remote_device(&self) {
|
pub fn restart_remote_device(&self) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user