fix: Always create per-timeline menu (#1039)

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.
This commit is contained in:
Nik Clayton 2024-10-23 12:15:24 +02:00 committed by GitHub
parent 850b702092
commit 84aae1de7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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