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

Commit

Permalink
Merge pull request #10192 from NejcZdovc/hotfix/#10186-ledger-perf
Browse files Browse the repository at this point in the history
Removes unnecessary setFocusedFrame calls
  • Loading branch information
bbondy committed Aug 1, 2017
1 parent 950091b commit 5c83a83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/renderer/components/frame/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ class Frame extends React.Component {
}
}

onPropsChanged () {
if (this.props.isActive && isFocused()) {
onPropsChanged (prevProps = {}) {
if (this.props.isActive && !prevProps.isActive && isFocused()) {
windowActions.setFocusedFrame(this.props.location, this.props.tabId)
}
}
Expand Down Expand Up @@ -247,7 +247,7 @@ class Frame extends React.Component {
this.lastFrame = this.frame.delete('lastAccessedTime')

const cb = (prevProps = {}) => {
this.onPropsChanged()
this.onPropsChanged(prevProps)
if (this.props.isActive && !prevProps.isActive && !this.props.urlBarFocused) {
this.webview.focus()
}
Expand Down
1 change: 1 addition & 0 deletions js/stores/eventStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const doAction = (action) => {
}
break
default:
return
}

emitChanges()
Expand Down

0 comments on commit 5c83a83

Please sign in to comment.