mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-20 23:37:15 +00:00
Show the hosts in alphabetical order rather than in an undefined order
This commit is contained in:
1 parent
a8bcc6afba
commit
5daa82b0ba
3 files changed
+9
-1
No files matched your search
@@ -640,7 +640,9 @@ static NSMutableSet* hostList;
|
||||
UIComputerView* compView;
|
||||
float prevEdge = -1;
|
||||
@synchronized (hostList) {
|
||||
for (Host* comp in hostList) {
|
||||
// Sort the host list in alphabetical order
|
||||
NSArray* sortedHostList = [[hostList allObjects] sortedArrayUsingSelector:@selector(compareName:)];
|
||||
for (Host* comp in sortedHostList) {
|
||||
compView = [[UIComputerView alloc] initWithComputer:comp andCallback:self];
|
||||
compView.center = CGPointMake([self getCompViewX:compView addComp:addComp prevEdge:prevEdge], hostScrollView.frame.size.height / 2);
|
||||
prevEdge = compView.frame.origin.x + compView.frame.size.width;
|
||||
|
||||
Reference in new issue
Block a user