Skip to content

Commit

Permalink
Revert "Replace a call to a deprecated method to update context with …
Browse files Browse the repository at this point in the history
…the new one."

This reverts commit 5f0d384.

Introduced a bug where the system theme wasn't changing until app
restart.
  • Loading branch information
greyson-signal committed Aug 14, 2020
1 parent a73427d commit f84c822
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public static Context updateContext(Context context, String language) {
final Configuration config = resources.getConfiguration();
final Configuration newConfig = copyWithNewLocale(config, newLocale);

return context.createConfigurationContext(newConfig);
resources.updateConfiguration(newConfig, resources.getDisplayMetrics());

return context;
}

private static Configuration copyWithNewLocale(Configuration config, Locale locale) {
Expand Down

0 comments on commit f84c822

Please sign in to comment.