Skip to content

Commit

Permalink
Fixed bug #314 - locale field was resetting once empty. (#374)
Browse files Browse the repository at this point in the history
* Fixed bug #314 - locale field was resetting once empty.

* Default locale is now blank.
  • Loading branch information
Tony Anziano authored and eanders-ms committed Dec 20, 2017
1 parent 127e767 commit 1bbf3be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/client/addressBar/addressBarBotCreds.tsx
Expand Up @@ -36,9 +36,6 @@ import { getSettings, addSettingsListener } from '../settings';
import { IBot } from '../../types/botTypes';
import { AddressBarOperators } from './addressBarOperators';

const remote = require('electron').remote;


export class AddressBarBotCreds extends React.Component<{}, {}> {
settingsUnsubscribe: any;

Expand Down Expand Up @@ -134,7 +131,7 @@ export class AddressBarBotCreds extends React.Component<{}, {}> {
<input
type="text"
className="form-input addressbar-botcreds-input addressbar-botcreds-locale"
value={settings.addressBar.selectedBot.locale || remote.app.getLocale()}
value={settings.addressBar.selectedBot.locale}
onChange={e => this.localeChanged((e.target as any).value)} />
</div>
<div className="input-group">
Expand Down
4 changes: 2 additions & 2 deletions src/client/mainView.tsx
Expand Up @@ -232,12 +232,12 @@ export class MainView extends React.Component<{}, {}> {
}
}

initBotChatContainerRef(ref, initialWidth:number) {
initBotChatContainerRef(ref, initialWidth: number) {
this.botChatContainer = ref;
this.updateBotChatContainerCSS(initialWidth);
}

botChatComponent(initialWidth:number) {
botChatComponent(initialWidth: number) {
if (this.directline) {
const settings = getSettings();
const srvSettings = new ServerSettings(settings.serverSettings);
Expand Down
4 changes: 2 additions & 2 deletions src/types/serverSettingsTypes.ts
Expand Up @@ -34,7 +34,6 @@
import { IBot } from '../types/botTypes';
import { IUser } from '../types/userTypes';


export interface IFrameworkSettings {
// path to use for ngrok
ngrokPath?: string,
Expand Down Expand Up @@ -122,7 +121,8 @@ export const settingsDefault: ISettings = {
"botId": "default-bot",
"botUrl": "http://localhost:3978/api/messages",
"msaAppId": "",
"msaPassword": ""
"msaPassword": "",
"locale": ""
}
],
activeBot: '',
Expand Down

0 comments on commit 1bbf3be

Please sign in to comment.