Skip to content

Commit 2194ea4

Browse files
authored
fix: use activity context in keyboard language management dialog (#249)
Replaced application context usage with activity context in `ManageKeyboardLanguagesAdapter` so that the proper resource is resolved as per the attached base context in BaseSimpleActivity. Refs: #238
1 parent 66f6d3f commit 2194ea4

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- German QWERTZ layout without dedicated umlaut keys ([#47])
10+
811
### Changed
912
- Updated French AZERTY layout ([#134])
1013
- Updated Spanish layout ([#206])
1114

12-
### Added
13-
- German QWERTZ layout without dedicated umlaut keys ([#47])
15+
### Fixed
16+
- Keyboard language management dialog now respects `Use English language` preference ([#238])
1417

1518
## [1.4.0] - 2025-08-22
1619
### Added
@@ -83,6 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8386
[#202]: https://github.com/FossifyOrg/Keyboard/issues/202
8487
[#222]: https://github.com/FossifyOrg/Keyboard/issues/222
8588
[#230]: https://github.com/FossifyOrg/Keyboard/issues/230
89+
[#238]: https://github.com/FossifyOrg/Keyboard/issues/238
8690

8791
[Unreleased]: https://github.com/FossifyOrg/Keyboard/compare/1.4.0...HEAD
8892
[1.4.0]: https://github.com/FossifyOrg/Keyboard/compare/1.3.0...1.4.0

app/src/main/kotlin/org/fossify/keyboard/adapters/ManageKeyboardLanguagesAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal class ManageKeyboardLanguagesAdapter(
2828
override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
2929
val item = languagesList[position]
3030
holder.languageCheckboxItem.apply {
31-
text = config.context.getKeyboardLanguageText(item)
31+
text = context.getKeyboardLanguageText(item)
3232
isChecked = selectedLanguages.contains(item)
3333

3434
setOnClickListener {
@@ -47,7 +47,7 @@ internal class ManageKeyboardLanguagesAdapter(
4747

4848
fun getSelectedLanguages(): MutableSet<Int> {
4949
val defaultLang = config.getDefaultLanguage()
50-
if (selectedLanguages.size == 0) {
50+
if (selectedLanguages.isEmpty()) {
5151
selectedLanguages.add(defaultLang)
5252
}
5353
return selectedLanguages

0 commit comments

Comments
 (0)