Skip to content

Commit

Permalink
Fix to bounty list: only show bounties that are actually open (otherw…
Browse files Browse the repository at this point in the history
…ise it shows a lot of stuff and we don't want to clean that all up on the backend)
  • Loading branch information
davkutalek committed Jan 1, 2024
1 parent 44137e2 commit cd6a8c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ configurations.all {
}

group = "com.hover"
version = "1.19.14"
version = "1.19.15"

android {

Expand All @@ -53,7 +53,7 @@ android {
applicationId = "com.hover.stax"
minSdk = 21
targetSdk = 33
versionCode = 224
versionCode = 225
versionName = project.version.toString()
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class BountyRepositoryImpl(
if (channels.isEmpty() || bounties.isEmpty()) return emptyList()

// val openBounties = bounties.filter { it.action.bounty_is_open || it.transactionCount != 0 }

val openBounties = bounties.filter { it.action.bounty_is_open }
val channelBounties = channels.filter { c ->
bounties.any { it.action.channel_id == c.id }
openBounties.any { it.action.channel_id == c.id }
}.map { channel ->
ChannelBounties(channel, bounties.filter { it.action.channel_id == channel.id })
ChannelBounties(channel, openBounties.filter { it.action.channel_id == channel.id })
}

return channelBounties
Expand Down

0 comments on commit cd6a8c0

Please sign in to comment.