From de8cc9e4358c7ecab01faf0e5821cad5e4d9c330 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 11 May 2014 22:01:45 +0200 Subject: [PATCH] Fixed server sorting to use friendly name instead of display string. --- .../github/nutomic/controldlna/utility/DeviceArrayAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java b/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java index 4f660d2..cc12c1a 100644 --- a/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java +++ b/src/main/java/com/github/nutomic/controldlna/utility/DeviceArrayAdapter.java @@ -126,7 +126,8 @@ public class DeviceArrayAdapter extends ArrayAdapter> @Override public int compare(Device lhs, Device rhs) { - return lhs.getDisplayString().compareTo(rhs.getDisplayString()); + return lhs.getDetails().getFriendlyName() + .compareTo(rhs.getDetails().getFriendlyName()); } }); }