Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Dec 12, 2024
1 parent a0d8a81 commit 7d1b932
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,7 @@ class AppInitializer @Inject constructor(
*/
private inner class MemoryAndConfigChangeMonitor : ComponentCallbacks2 {
override fun onConfigurationChanged(newConfig: Configuration) {
// If per-app locale is enabled make sure the in-app locale is correct,
// otherwise reapply in-app locale on configuration change
// Make sure the in-app locale is correct
perAppLocaleManager.checkAndUpdateOldLanguagePrefKey()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import android.content.res.Configuration
import androidx.appcompat.app.AppCompatActivity

/**
* Update Dec 2024: We've added experimental support for per-app language preferences which
* negate the need for this class. Instead of extending from this class, we should extend
* Update Dec 2024: We've added support for per-app language preferences which negate
* the need for this class. Instead of extending from this class, we should extend
* from AppCompatActivity.
*/
abstract class LocaleAwareActivity : AppCompatActivity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class PerAppLocaleManager @Inject constructor(
return
}

// Only update if the language is different
if (languageCode.equals(getCurrentLocaleLanguageCode()).not()) {
setCurrentLocaleByLanguageCode(languageCode)
}
Expand Down

0 comments on commit 7d1b932

Please sign in to comment.