mirror of
https://github.com/rustdesk/rustdesk
synced 2026-05-24 09:28:23 +00:00
fix empty peers desktop
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
parent
6797e8af52
commit
c90c4a2e78
1 changed files with 3 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||
}
|
||||
}
|
||||
bool isPeersLoading = false;
|
||||
bool isPeersLoaded = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -155,6 +156,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||
await _getAllPeers();
|
||||
setState(() {
|
||||
isPeersLoading = false;
|
||||
isPeersLoaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +242,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
|||
if (textEditingValue.text == '') {
|
||||
return const Iterable<Peer>.empty();
|
||||
}
|
||||
else if (peers.isEmpty) {
|
||||
else if (peers.isEmpty && !isPeersLoaded) {
|
||||
Peer emptyPeer = Peer(
|
||||
id: '',
|
||||
username: '',
|
||||
|
|
|
|||
Loading…
Reference in a new issue