Create BadgedBarButtonItem class and use it for thread list item

This commit is contained in:
ismailgulek
2021-12-01 17:24:47 +03:00
parent 25916441b3
commit 719ef848b6
2 changed files with 123 additions and 5 deletions
+10 -5
View File
@@ -1528,11 +1528,16 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
- (UIBarButtonItem *)threadListBarButtonItem
{
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"room_context_menu_reply_in_thread"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(onThreadListTapped:)];
item.accessibilityLabel = [VectorL10n roomAccessibilityThreads];
UIButton *button = [[UIButton alloc] init];
button.contentEdgeInsets = UIEdgeInsetsMake(4, 8, 4, 8);
[button setImage:[UIImage imageNamed:@"room_context_menu_reply_in_thread"]
forState:UIControlStateNormal];
[button addTarget:self
action:@selector(onThreadListTapped:)
forControlEvents:UIControlEventTouchUpInside];
button.accessibilityLabel = [VectorL10n roomAccessibilityThreads];
BadgedBarButtonItem *item = [[BadgedBarButtonItem alloc] initWithBaseButton:button];
return item;
}