peers view show no more than 1000 after filter
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
a437524c8f
commit
5236dcfe52
@ -176,7 +176,8 @@ class _PeersViewState extends State<_PeersView> with WindowListener {
|
||||
return FutureBuilder<List<Peer>>(
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
final peers = snapshot.data!;
|
||||
var peers = snapshot.data!;
|
||||
if (peers.length > 1000) peers = peers.sublist(0, 1000);
|
||||
gFFI.peerTabModel.setCurrentTabCachedPeers(peers);
|
||||
buildOnePeer(Peer peer) {
|
||||
final visibilityChild = VisibilityDetector(
|
||||
|
@ -173,9 +173,6 @@ class GroupModel {
|
||||
}
|
||||
if (json.containsKey('total')) {
|
||||
if (total == 0) total = json['total'];
|
||||
if (total > 1000) {
|
||||
total = 1000;
|
||||
}
|
||||
if (json.containsKey('data')) {
|
||||
final data = json['data'];
|
||||
if (data is List) {
|
||||
@ -188,9 +185,6 @@ class GroupModel {
|
||||
} else {
|
||||
tmpPeers[index] = peer;
|
||||
}
|
||||
if (tmpPeers.length >= 1000) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user