Skip to content

Commit

Permalink
fix: Always create per-timeline menu
Browse files Browse the repository at this point in the history
Previous code only inflated the timeline fragment menu if swipe/refresh
was enabled -- a hold over from when "Refresh" was the only menu item.

There are other menu items now, and they were also hidden. Fix this by
always inflating the menu.
  • Loading branch information
nikclayton committed Oct 22, 2024
1 parent 850b702 commit f004ee0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,9 @@ class TimelineFragment :
}

override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
menuInflater.inflate(R.menu.fragment_timeline, menu)

if (isSwipeToRefreshEnabled) {
menuInflater.inflate(R.menu.fragment_timeline, menu)
menu.findItem(R.id.action_refresh)?.apply {
icon = IconicsDrawable(requireContext(), GoogleMaterial.Icon.gmd_refresh).apply {
sizeDp = 20
Expand Down

0 comments on commit f004ee0

Please sign in to comment.