mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-05 18:25:58 +03:00
Use signal instead of implicit inheritance to refresh CredentialItem
This commit is contained in:
parent
b01180827e
commit
c41e104dc7
@ -10,6 +10,7 @@ Rectangle {
|
||||
|
||||
signal singleClick(var mouse, var entry)
|
||||
signal doubleClick(var mouse, var entry)
|
||||
signal refresh(bool force)
|
||||
|
||||
color: getCredentialColor(index, model)
|
||||
Layout.minimumHeight: {
|
||||
@ -66,7 +67,7 @@ Rectangle {
|
||||
var timeLeft = model.code.valid_to - (Date.now() / 1000)
|
||||
if (timeLeft <= 0
|
||||
&& customTimeLeftBar.value > 0) {
|
||||
refreshDependingOnMode(true)
|
||||
refresh(true)
|
||||
}
|
||||
customTimeLeftBar.value = timeLeft
|
||||
}
|
||||
|
@ -290,6 +290,8 @@ ApplicationWindow {
|
||||
generateOrCopy()
|
||||
}
|
||||
|
||||
onRefresh: refreshDependingOnMode(force)
|
||||
|
||||
onSingleClick: {
|
||||
arrowKeys.forceActiveFocus()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user