elementary / switchboard-plug-locale

Switchboard Locale Plug
GNU Lesser General Public License v3.0
11 stars 10 forks source link

Installed Languages list does not refresh on changes #149

Open davidmhewitt opened 2 years ago

davidmhewitt commented 2 years ago

What Happened?

Due to the cached array here: https://github.com/elementary/switchboard-plug-locale/blob/a2e23143c6b4104c88f170883588d090556e893d/src/Utils.vala#L31-L35

Whenever we use the plug to install/remove languages, the list of installed languages displayed in the sidebar is not updated to reflect the new reality.

Steps to Reproduce

  1. Install or remove a language
  2. See that the change is not reflected in the sidebar
  3. Restarting switchboard causes the state to update

Expected Behavior

Languages that are removed should be removed from the list on successful removal Languages that are installed should be added to the list on successful installation

OS Version

6.x (Odin)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

davidmhewitt commented 2 years ago

Looking at this some more, Gnome.Languages.get_all_locales () has its own internal cache (that you can't clear), so we don't even need our cache here.

However, we'll need to see if we can ask upstream for a way to drop these caches and/or fake this by modifying the visual representation of which languages appear in the list when they're added/removed.

jeremypw commented 7 months ago

Still occurs in elementary 8 (Early Access)