summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiqi LIU <me@siqi.fr>2013-08-05 19:37:07 +0200
committerSiqi LIU <me@siqi.fr>2013-08-05 19:41:03 +0200
commitb8e7ab20d2bb79d54c6ac431d3e8d689b4a3447a (patch)
tree6a14439ce62de2c5b37eb92887677bb3077268a5
parentfd83796313aa431788066e3f33c0fff546d4f30f (diff)
remove timer on slideshow navbar when cleared
Change-Id: I6b56880e64c4f0bcf7883817f2fb60c2dced4fe3
-rw-r--r--ios/iosremote/iosremote/stopWatch.m10
1 files changed, 2 insertions, 8 deletions
diff --git a/ios/iosremote/iosremote/stopWatch.m b/ios/iosremote/iosremote/stopWatch.m
index b6d80f99275d..3f66c9b614a9 100644
--- a/ios/iosremote/iosremote/stopWatch.m
+++ b/ios/iosremote/iosremote/stopWatch.m
@@ -26,14 +26,12 @@
@synthesize lastInterval = _lastInterval;
-dispatch_queue_t backgroundQueue;
- (stopWatch *) init
{
self = [super init];
self.state = TIMER_STATE_CLEARED;
self.set = NO;
- backgroundQueue = dispatch_queue_create("com.libreoffice.iosremote", DISPATCH_QUEUE_CONCURRENT);
return self;
}
@@ -70,7 +68,6 @@ dispatch_queue_t backgroundQueue;
- (void)updateTimer
{
- dispatch_async(backgroundQueue, ^(void) {
// Create date from the elapsed time
NSDate *currentDate = [NSDate date];
NSTimeInterval timeInterval = [currentDate timeIntervalSinceDate:self.startDate] + self.lastInterval;
@@ -83,11 +80,8 @@ dispatch_queue_t backgroundQueue;
// Format the elapsed time and set it to the label
NSString *timeString = [dateFormatter stringFromDate:timerDate];
- dispatch_async(dispatch_get_main_queue(), ^{
- self.timeLabel.text = timeString;
- self.barItem.title = timeString;
- });
- });
+ self.timeLabel.text = timeString;
+ self.barItem.title = timeString;
}