From 1beebd19916f342a0e965b1d3ccdbf5d741831ca Mon Sep 17 00:00:00 2001 From: IndrekV Date: Mon, 14 May 2018 13:47:21 +0300 Subject: [PATCH] Update billable always after autocomplete select (mac) --- src/ui/osx/TogglDesktop/TimeEntryEditViewController.m | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m b/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m index 06f706fdca..78220385e7 100644 --- a/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m +++ b/src/ui/osx/TogglDesktop/TimeEntryEditViewController.m @@ -903,13 +903,7 @@ - (void)updateWithSelectedDescription:(AutocompleteItem *)autocomplete withKey:( const char *value = [[autocomplete.tags componentsJoinedByString:@"\t"] UTF8String]; toggl_set_time_entry_tags(ctx, GUID, value); - - bool_t isBillable = autocomplete.Billable; - - if (isBillable) - { - toggl_set_time_entry_billable(ctx, GUID, isBillable); - } + toggl_set_time_entry_billable(ctx, GUID, autocomplete.Billable); }); } [self.descriptionAutoCompleteInput becomeFirstResponder]; @@ -953,6 +947,7 @@ - (void)updateWithSelectedProject:(AutocompleteItem *)autocomplete withKey:(NSSt { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ toggl_set_time_entry_project(ctx, [self.timeEntry.GUID UTF8String], task_id, project_id, 0); + toggl_set_time_entry_billable(ctx, [self.timeEntry.GUID UTF8String], autocomplete.Billable); }); } [self.projectAutoCompleteInput becomeFirstResponder];