fix(@desktop/onboarding): an issue handling date on Ubuntu fixed
It seems that `new Date` with only minutes set on Ubuntu generates different datetime then on Mac.
This commit is contained in:
parent
d7e4ee2395
commit
4fb18e7cac
|
@ -20,13 +20,12 @@ Item {
|
|||
QtObject {
|
||||
id: d
|
||||
|
||||
property int timeout: Constants.onboarding.profileFetching.timeout
|
||||
property int counter: d.timeout
|
||||
property int counter: Constants.onboarding.profileFetching.timeout
|
||||
}
|
||||
|
||||
onStateChanged: {
|
||||
if (root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching) {
|
||||
d.counter = d.timeout
|
||||
d.counter = Constants.onboarding.profileFetching.timeout
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +150,7 @@ Item {
|
|||
running: root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
d.counter--
|
||||
d.counter = d.counter - 1000 // decrease 1000 ms
|
||||
if (d.counter == 0) {
|
||||
root.startupStore.doPrimaryAction()
|
||||
}
|
||||
|
@ -179,11 +178,15 @@ Item {
|
|||
}
|
||||
PropertyChanges {
|
||||
target: button
|
||||
text: Qt.formatTime(new Date(0, 0, 0, 0, 0, d.counter), "m:ss")
|
||||
text: {
|
||||
let date = new Date(0)
|
||||
date.setTime(date.getTime() + d.counter)
|
||||
return Qt.formatTime(date, "m:ss")
|
||||
}
|
||||
}
|
||||
PropertyChanges {
|
||||
target: d
|
||||
counter: d.timeout
|
||||
counter: Constants.onboarding.profileFetching.timeout
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
|
|
@ -343,7 +343,7 @@ QtObject {
|
|||
readonly property int loginInfoHeight3: 66
|
||||
readonly property int radius: 8
|
||||
readonly property QtObject profileFetching: QtObject {
|
||||
readonly property int timeout: 120 //2 mins (120 secs)
|
||||
readonly property int timeout: 120 * 1000 //2 mins in milliseconds
|
||||
readonly property int titleFontSize: 22
|
||||
readonly property int entityFontSize: 15
|
||||
readonly property int entityProgressFontSize: 12
|
||||
|
|
Loading…
Reference in New Issue