mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Update the roomParticipant text color
-> use vector green color -> remove useless title -> add a place holder in the search bar.
This commit is contained in:
@@ -83,6 +83,8 @@
|
||||
// addParticipantsSearchBarCell.mxkSearchBar.barTintColor = [UIColor whiteColor]; // set barTint in case of UISearchBarStyleDefault (= UISearchBarStyleProminent)
|
||||
addParticipantsSearchBarCell.mxkSearchBar.returnKeyType = UIReturnKeyDone;
|
||||
addParticipantsSearchBarCell.mxkSearchBar.delegate = self;
|
||||
addParticipantsSearchBarCell.mxkSearchBar.placeholder = NSLocalizedStringFromTable(@"room_participants_invite_another_user", @"Vector", nil);
|
||||
|
||||
_isAddParticipantSearchBarEditing = NO;
|
||||
|
||||
if (! mutableParticipants)
|
||||
@@ -99,9 +101,12 @@
|
||||
MXKContactTableCell *tmpCell = [[MXKContactTableCell alloc] init];
|
||||
UIButton *actionButton = tmpCell.contactAccessoryButton;
|
||||
[actionButton setTitle:NSLocalizedStringFromTable(@"leave", @"Vector", nil) forState:UIControlStateNormal];
|
||||
[actionButton setTitleColor:VECTOR_GREEN_COLOR forState:UIControlStateNormal];
|
||||
[actionButton sizeToFit];
|
||||
|
||||
actionButtonWidth = actionButton.frame.size.width;
|
||||
[actionButton setTitle:NSLocalizedStringFromTable(@"remove", @"Vector", nil) forState:UIControlStateNormal];
|
||||
[actionButton setTitleColor:VECTOR_GREEN_COLOR forState:UIControlStateNormal];
|
||||
[actionButton sizeToFit];
|
||||
if (actionButton.frame.size.width > actionButtonWidth)
|
||||
{
|
||||
@@ -467,7 +472,7 @@
|
||||
|
||||
if (section == addParticipantsSection)
|
||||
{
|
||||
count = 2;
|
||||
count = 1;
|
||||
}
|
||||
else if (section == searchResultSection)
|
||||
{
|
||||
@@ -487,11 +492,7 @@
|
||||
|
||||
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
if (section == addParticipantsSection)
|
||||
{
|
||||
return NSLocalizedStringFromTable(@"room_participants_add_participant", @"Vector", nil);
|
||||
}
|
||||
else if (section == participantsSection)
|
||||
if (section == participantsSection)
|
||||
{
|
||||
NSInteger count = mutableParticipants.count;
|
||||
if (userMatrixId)
|
||||
@@ -507,7 +508,6 @@
|
||||
{
|
||||
return NSLocalizedStringFromTable(@"room_participants_one_participant", @"Vector", nil);
|
||||
}
|
||||
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -526,18 +526,6 @@
|
||||
[addParticipantsSearchBarCell.mxkSearchBar becomeFirstResponder];
|
||||
}
|
||||
}
|
||||
else if (indexPath.row == 1)
|
||||
{
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:@"addParticipantsSeparator"];
|
||||
if (!cell)
|
||||
{
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"addParticipantsSeparator"];
|
||||
UIView *separator = [[UIView alloc] initWithFrame:CGRectMake(0, 8, cell.frame.size.width, 2)];
|
||||
separator.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
separator.backgroundColor = [UIColor blackColor];
|
||||
[cell.contentView addSubview:separator];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (indexPath.section == searchResultSection)
|
||||
{
|
||||
@@ -594,6 +582,7 @@
|
||||
UIButton *actionButton = participantCell.contactAccessoryButton;
|
||||
actionButton.hidden = NO;
|
||||
[actionButton setTitle:NSLocalizedStringFromTable(@"leave", @"Vector", nil) forState:UIControlStateNormal];
|
||||
[actionButton setTitleColor:VECTOR_GREEN_COLOR forState:UIControlStateNormal];
|
||||
[actionButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
|
||||
actionButton.tag = 0;
|
||||
[actionButton sizeToFit];
|
||||
@@ -659,6 +648,7 @@
|
||||
UIButton *actionButton = participantCell.contactAccessoryButton;
|
||||
actionButton.hidden = NO;
|
||||
[actionButton setTitle:NSLocalizedStringFromTable(@"remove", @"Vector", nil) forState:UIControlStateNormal];
|
||||
[actionButton setTitleColor:VECTOR_GREEN_COLOR forState:UIControlStateNormal];
|
||||
[actionButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
|
||||
actionButton.tag = indexPath.row;
|
||||
[actionButton sizeToFit];
|
||||
@@ -699,6 +689,7 @@
|
||||
return 44;
|
||||
}
|
||||
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section
|
||||
{
|
||||
if([view isKindOfClass:[UITableViewHeaderFooterView class]])
|
||||
@@ -706,7 +697,7 @@
|
||||
UITableViewHeaderFooterView *tableViewHeaderFooterView = (UITableViewHeaderFooterView *) view;
|
||||
tableViewHeaderFooterView.textLabel.text = [tableViewHeaderFooterView.textLabel.text capitalizedString];
|
||||
tableViewHeaderFooterView.textLabel.font = [UIFont boldSystemFontOfSize:17];
|
||||
tableViewHeaderFooterView.textLabel.textColor = [UIColor blackColor];
|
||||
tableViewHeaderFooterView.textLabel.textColor = VECTOR_GREEN_COLOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user