Fix recording list. Change of cell background color

This commit is contained in:
Benoit Martins 2022-11-18 15:44:01 +01:00 committed by QuentinArguillere
parent 62f7d8a620
commit 236a8ee52f
4 changed files with 9 additions and 10 deletions

View file

@ -91,8 +91,8 @@
#pragma mark -
- (void)accessoryForCell:(UITableViewCell *)cell atPath:(NSIndexPath *)indexPath {
cell.selectionStyle = UITableViewCellSelectionStyleGray;
if ([self isEditing]) {
cell.selectionStyle = UITableViewCellSelectionStyleGray;
UIButton *checkBoxButton = [UIButton buttonWithType:UIButtonTypeCustom];
UIImage *image = nil;
if ([_selectedItems containsObject:indexPath]) {

View file

@ -25,8 +25,6 @@
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (strong, nonatomic) IBOutlet UIToolbar *toolbar;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *shareButton;
@property(nonatomic, assign) __block NSString *recording;
- (id)initWithIdentifier:(NSString*)identifier;

View file

@ -90,7 +90,8 @@ static UILinphoneAudioPlayer *player;
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
self.selectionStyle = UITableViewCellSelectionStyleNone;
if (!VIEW(RecordingsListView).tableController.isEditing)
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (void)updateFrame {
@ -105,10 +106,11 @@ static UILinphoneAudioPlayer *player;
-(void)setSelected:(BOOL)selected animated:(BOOL)animated{
[super setSelected:selected animated:animated];
_toolbar.hidden = !selected;
if (!selected) {
return;
}
if (!selected || (selected && VIEW(RecordingsListView).tableController.isEditing)) {
_toolbar.hidden = true;
return;
}
if (player && [player isCreated]) {
[player close];
}
@ -122,6 +124,7 @@ static UILinphoneAudioPlayer *player;
player.view.frame = _playerView.frame;
player.view.bounds = _playerView.bounds;
[player open];
_toolbar.hidden = false;
}
- (void)onShareButtonPressed {

View file

@ -147,8 +147,6 @@
NSString *recordingPath = subAr[indexPath.row];
[cell setRecording:recordingPath];
[super accessoryForCell:cell atPath:indexPath];
//accessoryForCell set it to gray but we don't want it
cell.selectionStyle = UITableViewCellSelectionStyleNone;
[cell updateFrame];
cell.contentView.userInteractionEnabled = false;
return cell;