forked from Shinonome/dots-hyprland
persistent states: also use jsonadapter
This commit is contained in:
@@ -274,7 +274,7 @@ Singleton {
|
||||
},
|
||||
}
|
||||
}
|
||||
property var currentProvider: PersistentStates.booru.provider
|
||||
property var currentProvider: Persistent.states.booru.provider
|
||||
|
||||
function getWorkingImageSource(url) {
|
||||
if (url.includes('pximg.net')) {
|
||||
@@ -286,7 +286,7 @@ Singleton {
|
||||
function setProvider(provider) {
|
||||
provider = provider.toLowerCase()
|
||||
if (providerList.indexOf(provider) !== -1) {
|
||||
PersistentStateManager.setState("booru.provider", provider)
|
||||
Persistent.states.booru.provider = provider
|
||||
root.addSystemMessage(qsTr("Provider set to ") + providers[provider].name
|
||||
+ (provider == "zerochan" ? qsTr(". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!") : ""))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user