Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Update billable always after autocomplete select (mac)
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrekV committed May 14, 2018
1 parent e632ea6 commit 1beebd1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ui/osx/TogglDesktop/TimeEntryEditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 1beebd1

Please sign in to comment.