From d785d3aa219610e4d5a081d881e378a82642542d Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 31 Aug 2021 18:06:14 +0200 Subject: [PATCH] properly sort by name Signed-off-by: Andy Scherzinger --- .../third_parties/daveKoeller/AlphanumComparator.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/third_parties/daveKoeller/AlphanumComparator.java b/app/src/main/java/third_parties/daveKoeller/AlphanumComparator.java index 5f8dc8756..07f117776 100644 --- a/app/src/main/java/third_parties/daveKoeller/AlphanumComparator.java +++ b/app/src/main/java/third_parties/daveKoeller/AlphanumComparator.java @@ -24,6 +24,8 @@ package third_parties.daveKoeller; +import com.nextcloud.talk.components.filebrowser.adapters.items.BrowserFileItem; + import java.io.File; import java.io.Serializable; import java.math.BigInteger; @@ -85,9 +87,9 @@ public class AlphanumComparator implements Comparator, Serializable { return chunk.toString(); } - public int compare(File f1, File f2) { - String s1 = f1.getPath(); - String s2 = f2.getPath(); + public int compare(BrowserFileItem f1, BrowserFileItem f2) { + String s1 = f1.getModel().path; + String s2 = f2.getModel().path; return compare(s1, s2); }