a little redundant code removal
This commit is contained in:
parent
a1a3c43d19
commit
b237f6089a
|
@ -2650,40 +2650,30 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||||
[movingTorrents addObject: [fTableView itemAtRow: i]];
|
[movingTorrents addObject: [fTableView itemAtRow: i]];
|
||||||
|
|
||||||
//find torrent to place under
|
//find torrent to place under
|
||||||
|
NSArray * groupTorrents = item ? [item objectForKey: @"Torrents"] : fDisplayedTorrents;
|
||||||
Torrent * topTorrent = nil;
|
Torrent * topTorrent = nil;
|
||||||
if (item) //sorting by group
|
for (i = newRow-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
#warning get working
|
Torrent * tempTorrent = [groupTorrents objectAtIndex: i];
|
||||||
|
if (![movingTorrents containsObject: tempTorrent])
|
||||||
|
{
|
||||||
|
topTorrent = tempTorrent;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#warning get working
|
||||||
|
//reset groups
|
||||||
|
/*if (item)
|
||||||
|
{
|
||||||
|
|
||||||
//change groups
|
//change groups
|
||||||
/*int groupValue = [[item objectForKey: @"Group"] intValue];
|
int groupValue = [[item objectForKey: @"Group"] intValue];
|
||||||
NSEnumerator * enumerator = [movingTorrents objectEnumerator];
|
NSEnumerator * enumerator = [movingTorrents objectEnumerator];
|
||||||
Torrent * torrent;
|
Torrent * torrent;
|
||||||
while ((torrent = [enumerator nextObject]))
|
while ((torrent = [enumerator nextObject]))
|
||||||
[torrent setGroupValue: groupValue];*/
|
[torrent setGroupValue: groupValue];
|
||||||
|
}*/
|
||||||
NSArray * groupTorrents = [item objectForKey: @"Torrents"];
|
|
||||||
for (i = newRow-1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
Torrent * tempTorrent = [groupTorrents objectAtIndex: i];
|
|
||||||
if (![movingTorrents containsObject: tempTorrent])
|
|
||||||
{
|
|
||||||
topTorrent = tempTorrent;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (i = newRow-1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
Torrent * tempTorrent = [fDisplayedTorrents objectAtIndex: i];
|
|
||||||
if (![movingTorrents containsObject: tempTorrent])
|
|
||||||
{
|
|
||||||
topTorrent = tempTorrent;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//get all torrents to reorder
|
//get all torrents to reorder
|
||||||
NSSortDescriptor * orderDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"orderValue" ascending: YES] autorelease];
|
NSSortDescriptor * orderDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"orderValue" ascending: YES] autorelease];
|
||||||
|
|
Loading…
Reference in New Issue