Skip to content

Commit 0f1183f

Browse files
author
Adrián García
committed
Change toggleAbility to toggleEnabled
1 parent 16931f7 commit 0f1183f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Fixed
99
- Fix `ConcurrentModificationException`s in store subscriptions' iteration by adding safe iteration over them.
10+
- Rename `toggleAbility` to `toggleEnabled` as the name was confusing.
1011

1112
## [1.1.2] - 2020-02-07
1213
### Added
@@ -66,7 +67,7 @@ state (`success` or `failure`)
6667
### Added
6768
- Initial architecture release.
6869

69-
[Unreleased]: https://github.com/bq/mini-kotlin/compare/1.1.1...HEAD
70+
[Unreleased]: https://github.com/bq/mini-kotlin/compare/1.1.2...HEAD
7071
[1.1.2]: https://github.com/bq/mini-kotlin/compare/1.1.1...1.1.2
7172
[1.1.1]: https://github.com/bq/mini-kotlin/compare/1.1.0...1.1.1
7273
[1.1.0]: https://github.com/bq/mini-kotlin/compare/1.0.9...1.1.0

mini-android/src/main/java/com/mini/android/ViewExtensions.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ fun View.toggleVisibility(@IntRange(from = View.INVISIBLE.toLong(), to = View.GO
4646
}
4747

4848
/**
49-
* Toggles the [View] ability status: enabled if disabled or disabled if enabled
49+
* Toggles the [View] enabled status: enabled if disabled or disabled if enabled.
5050
*/
51-
fun View.toggleAbility() {
51+
fun View.toggleEnabled() {
5252
isEnabled = !isEnabled
5353
}
5454

@@ -115,6 +115,6 @@ fun List<View>.toggleVisibility(@IntRange(from = View.INVISIBLE.toLong(), to = V
115115
}
116116

117117
/**
118-
* Toggles the [View] ability status: enabled if disabled or disabled if enabled
118+
* Toggles the [View] list enabled status: enabled if disabled or disabled if enabled.
119119
*/
120-
fun List<View>.toggleAbility() = forEach { it.toggleAbility() }
120+
fun List<View>.toggleEnabled() = forEach { it.toggleEnabled() }

0 commit comments

Comments
 (0)