From ffe8045d822ed895a849b0ed319164aae29ea467 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 8 Jan 2019 13:50:47 -0800 Subject: [PATCH] don't make title a link on android. fixes #1059 --- app/ui/header.js | 24 ++++++++++++++++++------ app/utils.js | 3 +++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/ui/header.js b/app/ui/header.js index 768c5d51..deefb5af 100644 --- a/app/ui/header.js +++ b/app/ui/header.js @@ -1,6 +1,7 @@ const html = require('choo/html'); const Component = require('choo/component'); const Account = require('./account'); +const { browserName } = require('../utils'); class Header extends Component { constructor(name, state, emit) { @@ -16,16 +17,27 @@ class Header extends Component { } createElement() { + const title = + browserName() === 'android-app' + ? html` + + ` + : html` + + `; return html`
- - ${this.account.render()} + ${title} ${this.account.render()}
`; } diff --git a/app/utils.js b/app/utils.js index 174cd238..58ac64e9 100644 --- a/app/utils.js +++ b/app/utils.js @@ -146,6 +146,9 @@ function browserName() { if (/safari/i.test(navigator.userAgent)) { return 'safari'; } + if (/send android/i.test(navigator.userAgent)) { + return 'android-app'; + } return 'other'; } catch (e) { return 'unknown';