Skip to content

Commit

Permalink
Update giveaways filter events to accept nullable parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaMohamed2002 committed Nov 9, 2024
1 parent 032969b commit b510be6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ sealed class DealsAndGiveawayScreenUiEvent {
) : DealsAndGiveawayScreenUiEvent()

data class OnGiveawaysSortByFilterChanged(
val sortBy: String
val sortBy: String?
) : DealsAndGiveawayScreenUiEvent()

data class OnGiveawaysTypeFilterChanged(
val type: String
val type: String?
) : DealsAndGiveawayScreenUiEvent()

data class OnGiveawaysPlatformFilterChanged(
val platform: String
val platform: String?
) : DealsAndGiveawayScreenUiEvent()

data object OnApplyGiveawaysFilters : DealsAndGiveawayScreenUiEvent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ fun DealsScreen(
if (state.giveawaysFilterSortBy == it) {
viewModel.onEvent(
DealsAndGiveawayScreenUiEvent.OnGiveawaysSortByFilterChanged(
""
null
)
)
} else {
Expand Down Expand Up @@ -825,7 +825,7 @@ fun DealsScreen(
if (state.giveawaysFilterType == it) {
viewModel.onEvent(
DealsAndGiveawayScreenUiEvent.OnGiveawaysTypeFilterChanged(
""
null
)
)
} else {
Expand Down Expand Up @@ -880,7 +880,7 @@ fun DealsScreen(
if (state.giveawaysFilterPlatform == it) {
viewModel.onEvent(
DealsAndGiveawayScreenUiEvent.OnGiveawaysPlatformFilterChanged(
""
null
)
)
} else {
Expand Down

0 comments on commit b510be6

Please sign in to comment.