mirror of
https://github.com/transmission/transmission
synced 2025-03-10 06:02:57 +00:00
sort by state will sort by progress afterwards
This commit is contained in:
parent
e1cf898983
commit
8f9ca03e98
1 changed files with 6 additions and 6 deletions
|
@ -790,7 +790,10 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
NSSortDescriptor * nameDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"name" ascending: YES] autorelease],
|
||||
* dateDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"date" ascending: YES] autorelease];
|
||||
@"date" ascending: YES] autorelease],
|
||||
* progressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"progressSortKey" ascending: YES] autorelease];
|
||||
|
||||
NSArray * descriptors;
|
||||
if ([fSortType isEqualToString: @"Name"])
|
||||
descriptors = [[NSArray alloc] initWithObjects: nameDescriptor, dateDescriptor, nil];
|
||||
|
@ -798,14 +801,11 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
{
|
||||
NSSortDescriptor * stateDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"stateSortKey" ascending: NO] autorelease];
|
||||
descriptors = [[NSArray alloc] initWithObjects: stateDescriptor, nameDescriptor, dateDescriptor, nil];
|
||||
descriptors = [[NSArray alloc] initWithObjects: stateDescriptor, progressDescriptor,
|
||||
nameDescriptor, dateDescriptor, nil];
|
||||
}
|
||||
else if ([fSortType isEqualToString: @"Progress"])
|
||||
{
|
||||
NSSortDescriptor * progressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"progressSortKey" ascending: YES] autorelease];
|
||||
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, nameDescriptor, dateDescriptor, nil];
|
||||
}
|
||||
else
|
||||
descriptors = [[NSArray alloc] initWithObjects: dateDescriptor, nameDescriptor, nil];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue