diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml index 194f047a..d5c9eb11 100644 --- a/wizard/WizardMain.qml +++ b/wizard/WizardMain.qml @@ -83,6 +83,10 @@ ColumnLayout { } function switchPage(next) { + + // Android focus workaround + releaseFocus(); + // save settings for current page; if (next && typeof pages[currentPage].onPageClosed !== 'undefined') { if (pages[currentPage].onPageClosed(settings) !== true) { diff --git a/wizard/WizardPasswordUI.qml b/wizard/WizardPasswordUI.qml index 0239b6a6..d69197a6 100644 --- a/wizard/WizardPasswordUI.qml +++ b/wizard/WizardPasswordUI.qml @@ -42,19 +42,22 @@ ColumnLayout { wizard.nextButton.enabled = passwordItem.password === retypePasswordItem.password - // scorePassword returns value from 0 to... lots - var strength = walletManager.getPasswordStrength(passwordItem.password); - // consider anything below 10 bits as dire - strength -= 10 - if (strength < 0) - strength = 0 - // use a slight parabola to discourage short passwords - strength = strength ^ 1.2 / 3 - // mapScope does not clamp - if (strength > 100) - strength = 100 - // privacyLevel component uses 1..13 scale - privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength) + // TODO: password strength meter segfaults on Android. + if (!isMobile) { + // scorePassword returns value from 0 to... lots + var strength = walletManager.getPasswordStrength(passwordItem.password); + // consider anything below 10 bits as dire + strength -= 10 + if (strength < 0) + strength = 0 + // use a slight parabola to discourage short passwords + strength = strength ^ 1.2 / 3 + // mapScope does not clamp + if (strength > 100) + strength = 100 + // privacyLevel component uses 1..13 scale + privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength) + } } function resetFocus() { @@ -85,6 +88,7 @@ ColumnLayout { } PrivacyLevelSmall { + visible: !isMobile //TODO: strength meter doesnt work on Android Layout.topMargin: isMobile ? 20 * scaleRatio : 40 * scaleRatio Layout.fillWidth: true id: privacyLevel