Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
62dd8f35
Commit
62dd8f35
authored
Sep 12, 2016
by
d8ahazard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add custom comparator for Repos (sort them alphabetically)
Now they come out in a nice alphabetized list...
parent
1468dfd6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
RepoHelper.java
...src/main/java/com/topjohnwu/magisk/module/RepoHelper.java
+9
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/module/RepoHelper.java
View file @
62dd8f35
...
@@ -19,6 +19,8 @@ import java.text.ParseException;
...
@@ -19,6 +19,8 @@ import java.text.ParseException;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -51,6 +53,7 @@ public class RepoHelper {
...
@@ -51,6 +53,7 @@ public class RepoHelper {
BuildFromCache
();
BuildFromCache
();
}
}
Collections
.
sort
(
repos
,
new
CustomComparator
());
return
repos
;
return
repos
;
}
}
...
@@ -205,6 +208,12 @@ public class RepoHelper {
...
@@ -205,6 +208,12 @@ public class RepoHelper {
public
void
taskCompletionResult
(
String
result
);
public
void
taskCompletionResult
(
String
result
);
}
}
public
class
CustomComparator
implements
Comparator
<
Repo
>
{
@Override
public
int
compare
(
Repo
o1
,
Repo
o2
)
{
return
o1
.
getName
().
compareTo
(
o2
.
getName
());
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment