From 1d1e79c8028170d5f52cb411eb44c40eb91c1397 Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Wed, 19 Feb 2025 14:14:02 +0800 Subject: [PATCH] revert, peers card, sort by online status (#10829) Signed-off-by: fufesou --- flutter/lib/common/widgets/peers_view.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flutter/lib/common/widgets/peers_view.dart b/flutter/lib/common/widgets/peers_view.dart index 751c67477..842374a66 100644 --- a/flutter/lib/common/widgets/peers_view.dart +++ b/flutter/lib/common/widgets/peers_view.dart @@ -25,13 +25,13 @@ class PeerSortType { static const String remoteId = 'Remote ID'; static const String remoteHost = 'Remote Host'; static const String username = 'Username'; - // static const String status = 'Status'; + static const String status = 'Status'; static List values = [ PeerSortType.remoteId, PeerSortType.remoteHost, PeerSortType.username, - // PeerSortType.status + PeerSortType.status ]; } @@ -384,9 +384,9 @@ class _PeersViewState extends State<_PeersView> peers.sort((p1, p2) => p1.username.toLowerCase().compareTo(p2.username.toLowerCase())); break; - // case PeerSortType.status: - // peers.sort((p1, p2) => p1.online ? -1 : 1); - // break; + case PeerSortType.status: + peers.sort((p1, p2) => p1.online ? -1 : 1); + break; } }