Code Quality: Make sonar happier

by removing some code smells
This commit is contained in:
manuroe
2020-08-25 18:48:09 +02:00
parent 1325607bf3
commit efbca319f0
29 changed files with 20 additions and 271 deletions
@@ -93,12 +93,6 @@ enum
NOTIFICATION_SETTINGS_GLOBAL_SETTINGS_INDEX,
NOTIFICATION_SETTINGS_PIN_MISSED_NOTIFICATIONS_INDEX,
NOTIFICATION_SETTINGS_PIN_UNREAD_INDEX,
//NOTIFICATION_SETTINGS_CONTAINING_MY_USER_NAME_INDEX,
//NOTIFICATION_SETTINGS_CONTAINING_MY_DISPLAY_NAME_INDEX,
//NOTIFICATION_SETTINGS_SENT_TO_ME_INDEX,
//NOTIFICATION_SETTINGS_INVITED_TO_ROOM_INDEX,
//NOTIFICATION_SETTINGS_PEOPLE_LEAVE_JOIN_INDEX,
//NOTIFICATION_SETTINGS_CALL_INVITATION_INDEX,
};
enum
@@ -3014,46 +3008,6 @@ TableViewSectionsDelegate>
[self pushViewController:newPhoneNumberCountryPicker];
}
//- (void)onRuleUpdate:(id)sender
//{
// MXPushRule* pushRule = nil;
// MXSession* session = [[AppDelegate theDelegate].mxSessions objectAtIndex:0];
//
// NSInteger row = ((UIView*)sender).tag;
//
// if (row == NOTIFICATION_SETTINGS_CONTAINING_MY_DISPLAY_NAME_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterContainDisplayNameRuleID];
// }
// else if (row == NOTIFICATION_SETTINGS_CONTAINING_MY_USER_NAME_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterContainUserNameRuleID];
// }
// else if (row == NOTIFICATION_SETTINGS_SENT_TO_ME_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterOneToOneRoomRuleID];
// }
// else if (row == NOTIFICATION_SETTINGS_INVITED_TO_ROOM_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterInviteMeRuleID];
// }
// else if (row == NOTIFICATION_SETTINGS_PEOPLE_LEAVE_JOIN_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterMemberEventRuleID];
// }
// else if (row == NOTIFICATION_SETTINGS_CALL_INVITATION_INDEX)
// {
// pushRule = [session.notificationCenter ruleById:kMXNotificationCenterCallRuleID];
// }
//
// if (pushRule)
// {
// // toggle the rule
// [session.notificationCenter enableRule:pushRule isEnabled:!pushRule.enabled];
// }
//}
- (void)onSave:(id)sender
{
// sanity check