dhowe / AdNauseam

AdNauseam: Fight back against advertising surveillance
GNU General Public License v3.0
4.51k stars 189 forks source link

Array of ads used for "settings & ads" backup doesn't update, only is set on init #2298

Closed mneunomne closed 1 year ago

mneunomne commented 1 year ago

When exporting "settings & ads" the list of collected ads is not updated to the latest state, only to the state of the last start-up of AdNauseam.

Screenshot 2023-02-24 at 23 51 20

For example, if you start-up with no ads, then collect some, then try to export, they won't be included in the "settings & ads" backup download. Also if you try to clear the ads then make the "settings & ads", the deleted ads will still appear in the downloaded .json.

The backup option "only ads" still works fine, also the export from the vault, it is only the case of the "settings & ads" option, since the ad list is coming from different place in the code.

Currently on master, have no idea since when this bug is there, it's a bit tricky to catch if you already have a big ad set, you will never notice that some (the latest) are missing.

mneunomne commented 1 year ago

Everytime a user starts up the browser, or reloads the extension, this object will be set again, it only doesn't update to the "current session".

mneunomne commented 1 year ago
µb.changeUserSettings('admap', admap);

Fixed it, apparently the userData was not being updated when the storage data was.

mneunomne commented 1 year ago

Fixed, closing