Merge pull request #5551 from 21pages/android

mobile reset waitForImage
This commit is contained in:
RustDesk
2023-08-30 20:02:08 +08:00
committed by GitHub

View File

@@ -1716,6 +1716,14 @@ class FFI {
elevationModel = ElevationModel(WeakReference(this)); elevationModel = ElevationModel(WeakReference(this));
} }
/// Mobile reuse FFI
void mobileReset() {
ffiModel.waitForFirstImage.value = true;
ffiModel.waitForImageDialogShow.value = true;
ffiModel.waitForImageTimer?.cancel();
ffiModel.waitForImageTimer = null;
}
/// Start with the given [id]. Only transfer file if [isFileTransfer], only port forward if [isPortForward]. /// Start with the given [id]. Only transfer file if [isFileTransfer], only port forward if [isPortForward].
void start(String id, void start(String id,
{bool isFileTransfer = false, {bool isFileTransfer = false,
@@ -1727,6 +1735,7 @@ class FFI {
int? tabWindowId}) { int? tabWindowId}) {
closed = false; closed = false;
auditNote = ''; auditNote = '';
if (isMobile) mobileReset();
assert(!(isFileTransfer && isPortForward), 'more than one connect type'); assert(!(isFileTransfer && isPortForward), 'more than one connect type');
if (isFileTransfer) { if (isFileTransfer) {
connType = ConnType.fileTransfer; connType = ConnType.fileTransfer;