diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index f0012ac..ba7d9a0 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -103,7 +103,9 @@ CoverBackground { iconSource: appWin.coverType == "HOTP" ? "image://theme/icon-cover-refresh" : "image://theme/icon-cover-previous" onTriggered: { if (appWin.coverType == "HOTP") { - appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, "HOTP", appWin.CoverLen, 0, DB.getCounter(appWin.coverTitle, appWin.coverSecret, true)); + appWin.listModel.setProperty(appWin.coverIndex, "counter", DB.getCounter(appWin.coverTitle, appWin.coverSecret, true)); + appWin.listModel.setProperty(appWin.coverIndex, "otp", OTP.calcOTP(appWin.coverSecret, "HOTP", appWin.coverLen, 0, appWin.listModel.get(appWin.coverIndex).counter)); + appWin.coverOTP = appWin.listModel.get(appWin.coverIndex).otp; } else { var index = appWin.coverIndex - 1 if (index < 0) index = appWin.listModel.count - 1 diff --git a/qml/pages/AddOTP.qml b/qml/pages/AddOTP.qml index f4d895a..ac33528 100644 --- a/qml/pages/AddOTP.qml +++ b/qml/pages/AddOTP.qml @@ -124,6 +124,7 @@ Dialog { TextField { id: otpLen width: parent.width + visible: paramType != "TOTP_STEAM" ? true : false label: qsTr("Length") text: paramLen placeholderText: qsTr("Length of the Token")