mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-07 11:20:47 +03:00
Don't refresh codes when minimized
This commit is contained in:
parent
b8ce346012
commit
22807d740d
@ -25,6 +25,10 @@ ApplicationWindow {
|
|||||||
property var hotpCoolDowns: []
|
property var hotpCoolDowns: []
|
||||||
property var totpCoolDowns: []
|
property var totpCoolDowns: []
|
||||||
|
|
||||||
|
// Don't refresh credentials when window is minimized or hidden
|
||||||
|
// See http://doc.qt.io/qt-5/qwindow.html#Visibility-enum
|
||||||
|
property bool shouldRefresh: visibility != 3 && visibility != 0
|
||||||
|
|
||||||
SystemPalette {
|
SystemPalette {
|
||||||
id: palette
|
id: palette
|
||||||
}
|
}
|
||||||
@ -173,7 +177,6 @@ ApplicationWindow {
|
|||||||
function rememberPassword() {
|
function rememberPassword() {
|
||||||
var deviceId = device.oathId
|
var deviceId = device.oathId
|
||||||
settings.savedPasswords += deviceId + ':' + device.passwordKey + ';'
|
settings.savedPasswords += deviceId + ':' + device.passwordKey + ';'
|
||||||
console.log(settings.savedPasswords)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCredentialsChanged: {
|
onCredentialsChanged: {
|
||||||
@ -493,7 +496,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function refreshDependingOnMode(force) {
|
function refreshDependingOnMode(force) {
|
||||||
if (hasDevice) {
|
if (hasDevice && shouldRefresh) {
|
||||||
if (settings.slotMode && device.hasOTP) {
|
if (settings.slotMode && device.hasOTP) {
|
||||||
device.refreshSlotCredentials([settings.slot1, settings.slot2],
|
device.refreshSlotCredentials([settings.slot1, settings.slot2],
|
||||||
getSlotDigitsSettings(), force)
|
getSlotDigitsSettings(), force)
|
||||||
|
Loading…
Reference in New Issue
Block a user