fix: mobile, query onlines, on active (#8796)

* fix: mobile, query onlines, on active

Signed-off-by: dignow <linlong1265@gmail.com>

* Update peer_tab_page.dart

---------

Signed-off-by: dignow <linlong1265@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
dignow
2024-07-23 23:28:03 +08:00
committed by GitHub
parent 2ffc2ad85b
commit 614086a216
3 changed files with 35 additions and 14 deletions

View File

@@ -875,11 +875,14 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
@override
void initState() {
if (!PeerSortType.values.contains(peerSort.value)) {
peerSort.value = PeerSortType.remoteId;
bind.setLocalFlutterOption(
k: kOptionPeerSorting,
v: peerSort.value,
);
Future.delayed(Duration.zero, () {
// do not change obx directly in initState, so do in future.
peerSort.value = PeerSortType.remoteId;
bind.setLocalFlutterOption(
k: kOptionPeerSorting,
v: peerSort.value,
);
});
}
super.initState();
}