Add RemoteToolbar to Obx(()) to rebuild after pi is recved

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-08-24 13:07:36 +08:00
parent c1a577797a
commit 56ff88934f

View File

@ -266,12 +266,12 @@ class _RemotePageState extends State<RemotePage>
}, },
inputModel: _ffi.inputModel, inputModel: _ffi.inputModel,
child: getBodyForDesktop(context))), child: getBodyForDesktop(context))),
Obx( Obx(() => Stack(
() => _ffi.ffiModel.pi.isSet.isTrue && children: [
_ffi.ffiModel.pi.isSet.isTrue &&
_ffi.ffiModel.waitForFirstImage.isTrue _ffi.ffiModel.waitForFirstImage.isTrue
? emptyOverlay() ? emptyOverlay()
: Offstage(), : Offstage(),
),
RemoteToolbar( RemoteToolbar(
id: widget.id, id: widget.id,
ffi: _ffi, ffi: _ffi,
@ -281,9 +281,9 @@ class _RemotePageState extends State<RemotePage>
onEnterOrLeaveImageCleaner: () => onEnterOrLeaveImageCleaner: () =>
_onEnterOrLeaveImage4Toolbar = null, _onEnterOrLeaveImage4Toolbar = null,
), ),
Obx( _ffi.ffiModel.pi.isSet.isFalse ? emptyOverlay() : Offstage(),
() => _ffi.ffiModel.pi.isSet.isFalse ? emptyOverlay() : Offstage(), ],
), )),
], ],
), ),
); );