Skip to content

Commit 82f4b49

Browse files
authored
Merge pull request #149 from aejii/patch-1
clean user agent update windows
2 parents d69f766 + 18bcc36 commit 82f4b49

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

electron/core/user-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class UserAgent {
8989
];
9090

9191
public getString(): string {
92-
return this.userAgentString;
92+
return this.userAgentString + " DofusTouch Client " + settings.getSync('appVersion');
9393
}
9494

9595
private generateUserAgentString(): void {

electron/windows/update-window.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import electron = require('electron');
2+
import { UserAgent } from '../core/user-agent';
23

34
export class UpdateWindow {
45

@@ -32,6 +33,8 @@ export class UpdateWindow {
3233
enableRemoteModule: true
3334
}
3435
});
36+
let userAgent = new UserAgent(0);
37+
window.webContents.setUserAgent(userAgent.getString());
3538

3639
window.once('ready-to-show', () => { window.show() })
3740
window.on('closed', () => { window = null; });

0 commit comments

Comments
 (0)