Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Dec 11, 2018
1 parent 7d6d625 commit af0ff0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/component/src/Composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
sendPostBack,
setDictateInterims,
setDictateState,
setDirection,
setLanguage,
setSendBox,
setSendTimeout,
Expand Down
9 changes: 2 additions & 7 deletions packages/playground/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export default class extends React.Component {
groupTimestamp: window.sessionStorage.getItem('PLAYGROUND_GROUP_TIMESTAMP'),
hideSendBox: false,
language: window.sessionStorage.getItem('PLAYGROUND_LANGUAGE') || '',
direction: 'ltr',
sendTimeout: window.sessionStorage.getItem('PLAYGROUND_SEND_TIMEOUT') || '',
sendTyping: true,
userAvatarInitials: 'WC',
Expand Down Expand Up @@ -160,12 +159,8 @@ export default class extends React.Component {
}

handleLanguageChange({ target: { value } }) {
const lang = value || window.navigator.language;

this.setState(() => ({
language: value
}), () => {
this.setLanguage(lang);
this.setState(() => ({ language: value }), () => {
this.setLanguage(value || window.navigator.language);

window.sessionStorage.setItem('PLAYGROUND_LANGUAGE', value);
});
Expand Down

0 comments on commit af0ff0a

Please sign in to comment.