fix(gifs): fix call to setGifUnfurlingEnabled using a bad store (#16622)
Fixes #16598 The gif popup was using the global RootStore, but it didn't work and it's also not a good practice. I moved the function to enable to the GifStore which is accessible as a reference instead.
This commit is contained in:
parent
5d852b3606
commit
a6adb9eddb
|
@ -206,7 +206,7 @@ Popup {
|
|||
visible: true
|
||||
|
||||
onEnableGifsRequested: {
|
||||
RootStore.setGifUnfurlingEnabled(true)
|
||||
root.gifStore.setGifUnfurlingEnabled(true)
|
||||
root.gifStore.getTrendingsGifs()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,10 @@ QtObject {
|
|||
property var gifColumnC: d.gifsModuleInst ? d.gifsModuleInst.gifColumnC : null
|
||||
property bool gifLoading: d.gifsModuleInst ? d.gifsModuleInst.gifLoading : false
|
||||
|
||||
function setGifUnfurlingEnabled(value) {
|
||||
localAccountSensitiveSettings.gifUnfurlingEnabled = value
|
||||
}
|
||||
|
||||
function searchGifs(query) {
|
||||
if (d.gifsModuleInst)
|
||||
d.gifsModuleInst.searchGifs(query)
|
||||
|
|
|
@ -22,10 +22,6 @@ QtObject {
|
|||
localAccountSensitiveSettings.neverAskAboutUnfurlingAgain = value;
|
||||
}
|
||||
|
||||
function setGifUnfurlingEnabled(value) {
|
||||
localAccountSensitiveSettings.gifUnfurlingEnabled = value
|
||||
}
|
||||
|
||||
function getPasswordStrengthScore(password) {
|
||||
return root.privacyModule.getPasswordStrengthScore(password);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue