mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 08:23:01 +08:00
fix empty peers
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
parent
dad209d1cd
commit
935297b9e8
@ -54,6 +54,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool isPeersLoading = false;
|
bool isPeersLoading = false;
|
||||||
|
bool isPeersLoaded = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -136,6 +137,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
await _getAllPeers();
|
await _getAllPeers();
|
||||||
setState(() {
|
setState(() {
|
||||||
isPeersLoading = false;
|
isPeersLoading = false;
|
||||||
|
isPeersLoaded = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,7 +210,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
if (textEditingValue.text == '') {
|
if (textEditingValue.text == '') {
|
||||||
return const Iterable<Peer>.empty();
|
return const Iterable<Peer>.empty();
|
||||||
}
|
}
|
||||||
else if (peers.isEmpty) {
|
else if (peers.isEmpty && !isPeersLoaded) {
|
||||||
Peer emptyPeer = Peer(
|
Peer emptyPeer = Peer(
|
||||||
id: '',
|
id: '',
|
||||||
username: '',
|
username: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user