1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

on 10.6 continue updating the remaining displayed trackers when adding a new tracker

This commit is contained in:
Mitchell Livingston 2009-09-29 23:56:48 +00:00
parent e0a6e6ae44
commit d53f271f73

View file

@ -1448,6 +1448,24 @@ typedef enum
[fTrackerTable setTrackers: fTrackers];
[fTrackerTable reloadData];
}
else
{
if ([NSApp isOnSnowLeopardOrBetter])
{
NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
NSArray * tierAndTrackerBeingAdded = [fTrackers objectsAtIndexes: addedIndexes];
[fTrackers release];
fTrackers = [[torrent allTrackerStats] retain];
[fTrackers addObjectsFromArray: tierAndTrackerBeingAdded];
[fTrackerTable setTrackers: fTrackers];
NSIndexSet * updateIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTrackers count]-2)],
* columnIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [[fTrackerTable tableColumns] count])];
[fTrackerTable reloadDataForRowIndexes: updateIndexes columnIndexes: columnIndexes];
}
}
}
- (void) updateInfoPeers