mobile: limited height scroll tags/users, and scrollable peers

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-09-25 13:35:01 +08:00
parent 5236dcfe52
commit 167bf70cd6
6 changed files with 37 additions and 37 deletions

View File

@@ -197,23 +197,14 @@ class _PeersViewState extends State<_PeersView> with WindowListener {
: SizedBox(width: mobileWidth, child: visibilityChild);
}
final Widget child;
if (isDesktop) {
child = DynamicGridView.builder(
gridDelegate: SliverGridDelegateWithWrapping(
mainAxisSpacing: space / 2, crossAxisSpacing: space),
itemCount: peers.length,
itemBuilder: (BuildContext context, int index) {
return buildOnePeer(peers[index]);
},
);
} else {
child = Wrap(
spacing: space,
runSpacing: space,
children: peers.map((e) => buildOnePeer(e)).toList());
}
final child = DynamicGridView.builder(
gridDelegate: SliverGridDelegateWithWrapping(
mainAxisSpacing: space / 2, crossAxisSpacing: space),
itemCount: peers.length,
itemBuilder: (BuildContext context, int index) {
return buildOnePeer(peers[index]);
},
);
if (updateEvent == UpdateEvent.load) {
_curPeers.clear();
_curPeers.addAll(peers.map((e) => e.id));