Implemented a way to update the queue UI with a description of the current action.
This commit is contained in:
1 parent
a218dc8aae
commit
5219a73a7a
6 files changed
+42
-11
No files matched your search
+6
-1
@@ -249,7 +249,12 @@ NSString *SBQueueCancelledNotification = @"SBQueueCancelledNotification";
|
||||
* sends SBQueueWorkingNotification.
|
||||
*/
|
||||
- (void)handleSBStatusWorking:(CGFloat)progress index:(NSInteger)index {
|
||||
NSString *info = [NSString stringWithFormat:@"Processing file %ld of %lu.",(long)self.currentIndex + 1, (unsigned long)[self.items count]];
|
||||
NSString *description = self.currentItem.localizedWorkingDescription;
|
||||
if (!description) {
|
||||
description = NSLocalizedString(@"Working", @"");
|
||||
}
|
||||
NSString *info = [NSString stringWithFormat:@"%@, item %ld of %lu.", description, (long)self.currentIndex + 1, (unsigned long)self.items.count];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SBQueueWorkingNotification object:self userInfo:@{@"ProgressString": info,
|
||||
@"Progress": @(progress),
|
||||
@"ItemIndex": @(index)}];
|
||||
|
||||
Reference in new issue
Block a user