Check if peer info is set

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-08-24 12:03:29 +08:00
parent e17002c6da
commit 0e838d59d5
4 changed files with 48 additions and 22 deletions

View File

@@ -228,18 +228,12 @@ class _RemotePageState extends State<RemotePage>
removeSharedStates(widget.id);
}
Widget emptyOverlay() => GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
bind.sessionInputOsPassword(sessionId: sessionId, value: '');
},
child: BlockableOverlay(
/// the Overlay key will be set with _blockableOverlayState in BlockableOverlay
/// see override build() in [BlockableOverlay]
state: _blockableOverlayState,
underlying: Container(
color: Colors.transparent,
),
Widget emptyOverlay() => BlockableOverlay(
/// the Overlay key will be set with _blockableOverlayState in BlockableOverlay
/// see override build() in [BlockableOverlay]
state: _blockableOverlayState,
underlying: Container(
color: Colors.transparent,
),
);
@@ -273,7 +267,8 @@ class _RemotePageState extends State<RemotePage>
inputModel: _ffi.inputModel,
child: getBodyForDesktop(context))),
Obx(
() => _ffi.ffiModel.waitForFirstImage.isTrue
() => _ffi.ffiModel.pi.isSet.isTrue &&
_ffi.ffiModel.waitForFirstImage.isTrue
? emptyOverlay()
: Offstage(),
),
@@ -286,6 +281,9 @@ class _RemotePageState extends State<RemotePage>
onEnterOrLeaveImageCleaner: () =>
_onEnterOrLeaveImage4Toolbar = null,
),
Obx(
() => _ffi.ffiModel.pi.isSet.isFalse ? emptyOverlay() : Offstage(),
),
],
),
);