Skip to content
This repository was archived by the owner on Feb 17, 2020. It is now read-only.

Commit 760a0f4

Browse files
committed
Cleanup in EventDetailsActivity
1 parent 8419bb9 commit 760a0f4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

app/src/main/java/net/squanchy/eventdetails/EventDetailsActivity.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,12 @@ class EventDetailsActivity : AppCompatActivity() {
8282
override fun onFavoriteClick() {
8383
subscriptions.add(
8484
service.toggleFavorite(event)
85-
.subscribe(
86-
onFavouriteStateChange(),
87-
Timber::e
88-
)
85+
.subscribe(::onFavouriteStateChange, Timber::e)
8986
)
9087
}
9188
}
9289

93-
private fun onFavouriteStateChange() = { result: EventDetailsService.FavoriteResult ->
90+
private fun onFavouriteStateChange(result: EventDetailsService.FavoriteResult) {
9491
if (result === EventDetailsService.FavoriteResult.MUST_AUTHENTICATE) {
9592
requestSignIn()
9693
} else {

0 commit comments

Comments
 (0)