Skip to content

Commit

Permalink
Use not() instead of negating operator
Browse files Browse the repository at this point in the history
  • Loading branch information
rbenza authored and alexstyl committed Dec 26, 2021
1 parent 37a8c5f commit ec897a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/src/main/java/com/alexstyl/contactstore/UriFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal fun ContentResolver.uriFlow(uri: Uri): Flow<Unit> {
return callbackFlow {
val observer = object : ContentObserver(Handler(Looper.getMainLooper())) {
override fun onChange(selfChange: Boolean) {
if (!channel.isClosedForSend) {
if (channel.isClosedForSend.not()) {
trySend(Unit)
}
}
Expand Down

0 comments on commit ec897a6

Please sign in to comment.