mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-12-26 12:59:23 +00:00
Changed favourite switch to icon
This commit is contained in:
parent
40f53fc47a
commit
eb08a4eee1
1 changed files with 6 additions and 6 deletions
|
@ -142,18 +142,18 @@ Page {
|
|||
width: parent.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Switch {
|
||||
checked: model.fav
|
||||
IconButton {
|
||||
icon.source: fav == 1 ? "image://theme/icon-m-favorite-selected" : "image://theme/icon-m-favorite"
|
||||
anchors.left: parent.left
|
||||
onClicked: {
|
||||
if (checked) DB.setFav(title, secret)
|
||||
refreshOTPList();
|
||||
/*model.fav = checked ? 1 : 0;
|
||||
DB.setFav(title, secret)
|
||||
for (var i=0; i<otpListModel.count; i++) {
|
||||
if (i != index) {
|
||||
otpListModel.setProperty(i, "fav", 0);
|
||||
} else {
|
||||
otpListModel.setProperty(i, "fav", 1);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue