mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
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 {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
|
|
||||||
property int timeout: Constants.onboarding.profileFetching.timeout
|
property int counter: Constants.onboarding.profileFetching.timeout
|
||||||
property int counter: d.timeout
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onStateChanged: {
|
onStateChanged: {
|
||||||
if (root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching) {
|
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
|
running: root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
d.counter--
|
d.counter = d.counter - 1000 // decrease 1000 ms
|
||||||
if (d.counter == 0) {
|
if (d.counter == 0) {
|
||||||
root.startupStore.doPrimaryAction()
|
root.startupStore.doPrimaryAction()
|
||||||
}
|
}
|
||||||
@ -179,11 +178,15 @@ Item {
|
|||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: button
|
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 {
|
PropertyChanges {
|
||||||
target: d
|
target: d
|
||||||
counter: d.timeout
|
counter: Constants.onboarding.profileFetching.timeout
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
|
@ -343,7 +343,7 @@ QtObject {
|
|||||||
readonly property int loginInfoHeight3: 66
|
readonly property int loginInfoHeight3: 66
|
||||||
readonly property int radius: 8
|
readonly property int radius: 8
|
||||||
readonly property QtObject profileFetching: QtObject {
|
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 titleFontSize: 22
|
||||||
readonly property int entityFontSize: 15
|
readonly property int entityFontSize: 15
|
||||||
readonly property int entityProgressFontSize: 12
|
readonly property int entityProgressFontSize: 12
|
||||||
|
Loading…
x
Reference in New Issue
Block a user