Skip to content

Commit

Permalink
use profile for notification setup #91
Browse files Browse the repository at this point in the history
  • Loading branch information
roznet committed Jun 5, 2021
1 parent f4ee39c commit 5bd30a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ConnectStats/src/GCSettingsServicesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ case GC_IDENTIFIER(GC_SECTIONS_GARMIN, GC_GARMIN_METHOD):
case GC_IDENTIFIER(GC_SECTIONS_GARMIN, GC_CONNECTSTATS_NOTIFICATIONS):
{
if( cell.selected < [GCViewConfig validChoicesForConnectStatsNotificationType].count){
[[GCAppGlobal profile] configSet:CONFIG_NOTIFICATION_PUSH_TYPE intVal:cell.selected];
[[GCAppGlobal profile] setPushNotificationType:cell.selected];
NSString * choice = [GCViewConfig validChoicesForConnectStatsNotificationType][cell.selected];
RZLog(RZLogInfo, @"ConnectStats: Changed Notification to %@ : %@", @(cell.selected), choice);
[GCAppGlobal saveSettings];
Expand Down Expand Up @@ -987,7 +987,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
list.identifierInt = GC_IDENTIFIER(GC_SECTIONS_GARMIN,GC_CONNECTSTATS_USE);
[self.navigationController pushViewController:list animated:YES];
}else if( indexPath.section == GC_SECTIONS_GARMIN && indexPath.row == GC_CONNECTSTATS_NOTIFICATIONS){
GCCellEntryListViewController * list = [GCViewConfig standardEntryListViewController:[GCViewConfig validChoicesForConnectStatsNotificationType] selected:[[GCAppGlobal profile] configGetInt:CONFIG_NOTIFICATION_PUSH_TYPE defaultValue:gcNotificationPushTypeNone]];
GCCellEntryListViewController * list = [GCViewConfig standardEntryListViewController:[GCViewConfig validChoicesForConnectStatsNotificationType] selected:[[GCAppGlobal profile] pushNotificationType]];
list.entryFieldDelegate = self;
list.identifierInt = GC_IDENTIFIER(GC_SECTIONS_GARMIN,GC_CONNECTSTATS_NOTIFICATIONS);
[self.navigationController pushViewController:list animated:YES];
Expand Down

0 comments on commit 5bd30a2

Please sign in to comment.