From f5c59248c4a51207511b18a0589fefce190999b7 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 24 May 2018 13:21:02 +0200 Subject: [PATCH] simplify code --- Classes/LinphoneUI/UIChatNotifiedEventCell.m | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Classes/LinphoneUI/UIChatNotifiedEventCell.m b/Classes/LinphoneUI/UIChatNotifiedEventCell.m index e198cab93..6b093f8c2 100644 --- a/Classes/LinphoneUI/UIChatNotifiedEventCell.m +++ b/Classes/LinphoneUI/UIChatNotifiedEventCell.m @@ -62,42 +62,35 @@ static const CGFloat NOTIFIED_CELL_HEIGHT = 44; switch (linphone_event_log_get_type(event)) { case LinphoneEventLogTypeConferenceSubjectChanged: { NSString *subject = [NSString stringWithUTF8String:linphone_event_log_get_subject(event) ?: LINPHONE_DUMMY_SUBJECT]; - NSString *formatedString = [NSString stringWithFormat:@"New subject : %@", subject]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"New subject : %@", nil), subject]; break; } case LinphoneEventLogTypeConferenceParticipantAdded: { NSString *participant = [FastAddressBook displayNameForAddress:linphone_event_log_get_participant_address(event)]; - NSString *formatedString = [NSString stringWithFormat:@"%@ has joined", participant]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"%@ has joined", nil), participant]; break; } case LinphoneEventLogTypeConferenceParticipantRemoved: { NSString *participant = [FastAddressBook displayNameForAddress:linphone_event_log_get_participant_address(event)]; - NSString *formatedString = [NSString stringWithFormat:@"%@ has left", participant]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"%@ has left", nil), participant]; break; } case LinphoneEventLogTypeConferenceParticipantSetAdmin: { NSString *participant = [FastAddressBook displayNameForAddress:linphone_event_log_get_participant_address(event)]; - NSString *formatedString = [NSString stringWithFormat:@"%@ is now an admin", participant]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"%@ is now an admin", nil), participant]; break; } case LinphoneEventLogTypeConferenceParticipantUnsetAdmin: { NSString *participant = [FastAddressBook displayNameForAddress:linphone_event_log_get_participant_address(event)]; - NSString *formatedString = [NSString stringWithFormat:@"%@ is no longer an admin", participant]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"%@ is no longer an admin", nil), participant]; break; } case LinphoneEventLogTypeConferenceTerminated: { - NSString *formatedString = [NSString stringWithFormat:@"You have left the group"]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"You have left the group", nil)]; break; } case LinphoneEventLogTypeConferenceCreated: { - NSString *formatedString = [NSString stringWithFormat:@"You have joined the group"]; - eventString = NSLocalizedString(formatedString, nil); + eventString = [NSString stringWithFormat:NSLocalizedString(@"You have joined the group", nil)]; break; } default: