diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
index 4ff56a6f..a362412d 100644
Binary files a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate and b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index f7555a8b..f28871ba 100644
--- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -45,5 +45,26 @@
landmarkType = "5">
+
+
+
+
+
+
+
+
diff --git a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
index a0515e63..37c7d46a 100644
--- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
+++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
@@ -51,7 +51,8 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
- showNonLocalizedStrings = "YES">
+ showNonLocalizedStrings = "YES"
+ region = "DE">
#import "CLParentPanelController.h"
-@interface CLFloatingWindowController : CLParentPanelController
+@interface CLFloatingWindowController : CLParentPanelController
+
+@property (strong, nonatomic) NSTimer *floatingWindowTimer;
+ (instancetype)sharedFloatingWindow;
- (void)updatePanelColor;
+- (void)startWindowTimer;
+
@end
diff --git a/Clocker/Floating Window/CLFloatingWindowController.m b/Clocker/Floating Window/CLFloatingWindowController.m
index 3299897e..9928b546 100644
--- a/Clocker/Floating Window/CLFloatingWindowController.m
+++ b/Clocker/Floating Window/CLFloatingWindowController.m
@@ -144,6 +144,7 @@ -(NSView*)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *
cell.customName.stringValue = [dataObject formatStringShouldContainCity:YES];
NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey];
+
if ([displayFutureSlider isEqualToNumber:[NSNumber numberWithInteger:1]])
{
self.futureSlider.hidden = YES;
@@ -299,6 +300,28 @@ - (void)removeContextHelpForSlider
[NSApp postEvent:newEvent atStart:NO];
}
+-(void)windowWillClose:(NSNotification *)notification
+{
+ self.futureSliderValue = 0;
+
+ if (self.floatingWindowTimer)
+ {
+ [self.floatingWindowTimer invalidate];
+ self.floatingWindowTimer = nil;
+ }
+}
+
+- (void)startWindowTimer
+{
+ if (!self.floatingWindowTimer)
+ {
+ self.floatingWindowTimer = [NSTimer scheduledTimerWithTimeInterval:2.0
+ target:self
+ selector:@selector(updateTime) userInfo:nil
+ repeats:YES];
+ }
+}
+
- (void)updatePanelColor
{
[super updatePanelColor];
diff --git a/Clocker/Model/CLTimezoneData.m b/Clocker/Model/CLTimezoneData.m
index a9ac3da4..ac2c17be 100644
--- a/Clocker/Model/CLTimezoneData.m
+++ b/Clocker/Model/CLTimezoneData.m
@@ -218,10 +218,7 @@ - (NSString *)getLocalCurrentDate
}
- (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString *)date
-{
- NSParameterAssert(systemDate);
- NSParameterAssert(date);
-
+{
NSDateFormatter *formatter = [NSDateFormatter new];
formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy"
options:0
@@ -230,9 +227,6 @@ - (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString
NSDate *localDate = [formatter dateFromString:systemDate];
NSDate *timezoneDate = [formatter dateFromString:date];
- NSAssert(localDate != nil, @"Local date cannot be nil");
- NSAssert(timezoneDate != nil, @"Local date cannot be nil");
-
// Specify which units we would like to use
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSInteger weekday = [calendar component:NSCalendarUnitWeekday fromDate:localDate];