Skip to content

Commit

Permalink
Address bar UX improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
manojVivek committed May 21, 2020
1 parent eabfe8b commit 25c8fb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion desktop-app/app/actions/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ export function newFilters(filters) {
};
}

export function onAddressChange(newURL) {
export function onAddressChange(newURL, force) {
return (dispatch: Dispatch, getState: RootStateType) => {
const {
browser: {address},
} = getState();

if (newURL === address) {
if (force) {
pubsub.publish(NAVIGATION_RELOAD);
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion desktop-app/app/components/Addressinput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AddressBar extends React.Component<Props> {
return;
}
this.props.onChange &&
this.props.onChange(this._normalize(this.state.userTypedAddress));
this.props.onChange(this._normalize(this.state.userTypedAddress), true);
};

_normalize = address => {
Expand Down

0 comments on commit 25c8fb0

Please sign in to comment.