[Playlist] Correctly handle deleted items
The member that I set myself to indicate deletion has one capital letter to differentiate it from the built-in "delete" property of managed objects, which doesn't do what I want, so I had to dodge it with that capitalization thing. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
0b3e7e3ac3
commit
d972a6eaf5
2 changed files with 4 additions and 4 deletions
|
@ -1079,7 +1079,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
|||
} else {
|
||||
NSInteger i;
|
||||
|
||||
if(pe.deleted) // Was a current entry, now removed.
|
||||
if(pe.deLeted) // Was a current entry, now removed.
|
||||
{
|
||||
if(nextEntryAfterDeleted)
|
||||
i = nextEntryAfterDeleted.index;
|
||||
|
@ -1295,7 +1295,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
|||
|
||||
NSMutableIndexSet *refreshSet = [[NSMutableIndexSet alloc] init];
|
||||
|
||||
if(currentEntry != nil && !currentEntry.deleted) [refreshSet addIndex:currentEntry.index];
|
||||
if(currentEntry != nil && !currentEntry.deLeted) [refreshSet addIndex:currentEntry.index];
|
||||
if(pe != nil) [refreshSet addIndex:pe.index];
|
||||
|
||||
// Refresh entire row to refresh tooltips
|
||||
|
|
|
@ -640,7 +640,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
|||
NSBlockOperation *op = [[NSBlockOperation alloc] init];
|
||||
|
||||
[op addExecutionBlock:^{
|
||||
if(weakPe.deleted) {
|
||||
if(weakPe.deLeted) {
|
||||
[weakLock lock];
|
||||
progress += progressstep;
|
||||
[self setProgressJobStatus:progress];
|
||||
|
@ -684,7 +684,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
|||
__block PlaylistEntry *weakPe = [outArray objectAtIndex:i];
|
||||
__block NSDictionary *entryInfo = [outArray objectAtIndex:i + 1];
|
||||
dispatch_sync_reentrant(dispatch_get_main_queue(), ^{
|
||||
if(!weakPe.deleted) {
|
||||
if(!weakPe.deLeted) {
|
||||
[weakPe setMetadata:entryInfo];
|
||||
}
|
||||
progress += progressstep;
|
||||
|
|
Loading…
Reference in a new issue