Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed Languages list does not refresh on changes #149

Open
davidmhewitt opened this issue Nov 4, 2021 · 2 comments
Open

Installed Languages list does not refresh on changes #149

davidmhewitt opened this issue Nov 4, 2021 · 2 comments

Comments

@davidmhewitt
Copy link
Member

What Happened?

Due to the cached array here:

if (installed_languages != null) {
return installed_languages;
}
installed_languages = new Gee.ArrayList<string>.wrap (Gnome.Languages.get_all_locales ());

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
Copy link
Member Author

davidmhewitt commented Nov 4, 2021

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
Copy link
Collaborator

jeremypw commented Mar 8, 2024

Still occurs in elementary 8 (Early Access)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants