From 805a2a9b1d724823ace57557d19ea6369c491bf1 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Mon, 11 Mar 2024 20:32:06 +0100 Subject: [PATCH] feat: Show "Followed hashtags" menu item in left-nav --- app/src/main/java/app/pachli/MainActivity.kt | 26 +++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/app/pachli/MainActivity.kt b/app/src/main/java/app/pachli/MainActivity.kt index 72d1aa9f1..5821e3898 100644 --- a/app/src/main/java/app/pachli/MainActivity.kt +++ b/app/src/main/java/app/pachli/MainActivity.kt @@ -87,6 +87,7 @@ import app.pachli.core.navigation.AnnouncementsActivityIntent import app.pachli.core.navigation.ComposeActivityIntent import app.pachli.core.navigation.DraftsActivityIntent import app.pachli.core.navigation.EditProfileActivityIntent +import app.pachli.core.navigation.FollowedTagsActivityIntent import app.pachli.core.navigation.ListActivityIntent import app.pachli.core.navigation.LoginActivityIntent import app.pachli.core.navigation.LoginActivityIntent.LoginMode @@ -644,6 +645,20 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider { startActivityWithSlideInAnimation(intent) } }, + primaryDrawerItem { + nameRes = R.string.title_public_trending + iconicsIcon = GoogleMaterial.Icon.gmd_trending_up + onClick = { + startActivityWithSlideInAnimation(TrendingActivityIntent(context)) + } + }, + primaryDrawerItem { + nameRes = R.string.title_followed_hashtags + iconRes = R.drawable.ic_hashtag + onClick = { + startActivityWithSlideInAnimation(FollowedTagsActivityIntent(context)) + } + }, primaryDrawerItem { nameRes = R.string.action_view_follow_requests iconicsIcon = GoogleMaterial.Icon.gmd_person_add @@ -743,17 +758,6 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider { }, ) } - - binding.mainDrawer.addItemsAtPosition( - 5, - primaryDrawerItem { - nameRes = R.string.title_public_trending - iconicsIcon = GoogleMaterial.Icon.gmd_trending_up - onClick = { - startActivityWithSlideInAnimation(TrendingActivityIntent(context)) - } - }, - ) } if (BuildConfig.DEBUG) {