Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Re-add click listener for audio icon
Browse files Browse the repository at this point in the history
Auditors: @jkup
  • Loading branch information
bbondy committed Dec 20, 2016
1 parent 28b7e58 commit 448604f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/renderer/components/tabIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TabIcon extends ImmutableComponent {
styles.icon,
this.props.withBlueIcon && styles.blueIcon
)
return <div className={className}>
return <div className={className} onClick={this.props.onClick}>
<span className={this.props.styles} />
</div>
}
Expand Down
13 changes: 8 additions & 5 deletions js/components/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,15 @@ class Tab extends ImmutableComponent {
})
}

let playIcon = null
let playIcon = false
let iconClass = null

if (this.props.tab.get('audioPlaybackActive') || this.props.tab.get('audioMuted')) {
if (this.props.tab.get('audioPlaybackActive') && !this.props.tab.get('audioMuted')) {
iconClass = 'fa fa-volume-up'
} else if (this.props.tab.get('audioPlaybackActive') && this.props.tab.get('audioMuted')) {
iconClass = 'fa fa-volume-off'
}
playIcon = <AudioTabIcon styles={iconClass}
onClick={this.onMuteFrame.bind(this, !this.props.tab.get('audioMuted'))} />
playIcon = true
}

const locationHasFavicon = this.props.tab.get('location') !== 'about:newtab' && this.props.tab.get('location') !== 'about:blank'
Expand Down Expand Up @@ -238,7 +236,12 @@ class Tab extends ImmutableComponent {
style={iconStyle} />
: null
}
{playIcon}
{
playIcon
? <AudioTabIcon styles={iconClass}
onClick={this.onMuteFrame.bind(this, !this.props.tab.get('audioMuted'))} />
: null
}
{
!this.isPinned
? <div className='tabTitle'>
Expand Down

1 comment on commit 448604f

@bbondy
Copy link
Member Author

@bbondy bbondy commented on 448604f Dec 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #6305

Please sign in to comment.