Skip to content

Commit

Permalink
Merge branch 'main' into feature/pp-389
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Oct 23, 2023
2 parents 7dcc07e + a88ad63 commit 46fcb4c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
9 changes: 7 additions & 2 deletions README-CHANGES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,14 @@
<c:change date="2023-10-07T00:00:00+00:00" summary="Fixed Audiobook UI freezing after pressing 'play'."/>
</c:changes>
</c:release>
<c:release date="2023-10-16T11:36:56+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.6.1">
<c:release date="2023-10-18T00:00:00+00:00" is-open="false" ticket-system="org.nypl.jira" version="1.6.1">
<c:changes>
<c:change date="2023-10-16T11:36:56+00:00" summary="Fixed crash when creating a library card."/>
<c:change date="2023-10-16T00:00:00+00:00" summary="Fixed crash when creating a library card."/>
</c:changes>
</c:release>
<c:release date="2023-10-19T11:00:16+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.7.0">
<c:changes>
<c:change date="2023-10-19T11:00:16+00:00" summary="Adjusted feed tabs navigation to keep the Catalog on the top of the screen."/>
</c:changes>
</c:release>
</c:releases>
Expand Down
2 changes: 1 addition & 1 deletion org.thepalaceproject.android.platform
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ class CatalogFeedFragment : Fragment(R.layout.feed), AgeGateDialog.BirthYearSele
button.setOnClickListener {
this.logger.debug("selected entry point facet: {}", facet.title)
this.viewModel.openFacet(facet)
updateSelectedFacet(facetTabs = facetTabs, index = index)
}
}

Expand All @@ -778,6 +779,12 @@ class CatalogFeedFragment : Fragment(R.layout.feed), AgeGateDialog.BirthYearSele
}
}

private fun updateSelectedFacet(facetTabs: RadioGroup, index: Int) {
facetTabs.clearCheck()
val button = facetTabs.getChildAt(index) as RadioButton
facetTabs.check(button.id)
}

private fun showFacetSelectDialog(
groupName: String,
group: List<FeedFacet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,9 @@ class CatalogFeedViewModel(

fun openFacet(facet: FeedFacet) {
val feedArguments = this.resolveFacet(facet)
this.listener.post(
CatalogFeedEvent.OpenFeed(feedArguments)
)
val newState = CatalogFeedState.CatalogFeedLoading(feedArguments)
this.stateMutable.value = newState
reloadFeed()
}

/**
Expand Down

0 comments on commit 46fcb4c

Please sign in to comment.