Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

improve maxHeight desktop

Sahil Yeole6797e8af52c7
diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart
index 859fd0d70..9b21727d9 100644
--- a/flutter/lib/desktop/pages/connection_page.dart
+++ b/flutter/lib/desktop/pages/connection_page.dart
@@ -332,10 +332,8 @@ class _ConnectionPageState extends State<ConnectionPage>
));
},
optionsViewBuilder: (BuildContext context, AutocompleteOnSelected<Peer> onSelected, Iterable<Peer> options) {
- double maxHeight = 0;
- for (var peer in options) {
- if (maxHeight < 200)
- maxHeight += 50; };
+ double maxHeight = options.length * 50;
+ maxHeight = maxHeight > 200 ? 200 : maxHeight;
return Align(
alignment: Alignment.topLeft,
child: ClipRRect(