diff --git a/app/src/main/java/app/pachli/TabPreferenceActivity.kt b/app/src/main/java/app/pachli/TabPreferenceActivity.kt index d9e74f75a..acabb7f88 100644 --- a/app/src/main/java/app/pachli/TabPreferenceActivity.kt +++ b/app/src/main/java/app/pachli/TabPreferenceActivity.kt @@ -369,6 +369,14 @@ class TabPreferenceActivity : BaseActivity(), ItemInteractionListener { if (!currentTabs.contains(directMessagesTab)) { addableTabs.add(directMessagesTab) } + val bookmarksTab = TabViewData.from(Timeline.Bookmarks) + if (!currentTabs.contains(bookmarksTab)) { + addableTabs.add(bookmarksTab) + } + val favouritesTab = TabViewData.from(Timeline.Favourites) + if (!currentTabs.contains(favouritesTab)) { + addableTabs.add(favouritesTab) + } val trendingTagsTab = TabViewData.from(Timeline.TrendingHashtags) if (!currentTabs.contains(trendingTagsTab)) { addableTabs.add(trendingTagsTab) @@ -381,10 +389,6 @@ class TabPreferenceActivity : BaseActivity(), ItemInteractionListener { if (!currentTabs.contains(trendingStatusesTab)) { addableTabs.add(trendingStatusesTab) } - val bookmarksTab = TabViewData.from(Timeline.Bookmarks) - if (!currentTabs.contains(trendingTagsTab)) { - addableTabs.add(bookmarksTab) - } addableTabs.add(TabViewData.from(Timeline.Hashtags(emptyList()))) addableTabs.add(TabViewData.from(Timeline.UserList("", ""))) diff --git a/app/src/main/java/app/pachli/TabViewData.kt b/app/src/main/java/app/pachli/TabViewData.kt index c7c03d9b7..638579f64 100644 --- a/app/src/main/java/app/pachli/TabViewData.kt +++ b/app/src/main/java/app/pachli/TabViewData.kt @@ -135,7 +135,12 @@ data class TabViewData( icon = R.drawable.ic_bookmark_active_24dp, fragment = { TimelineFragment.newInstance(timeline) }, ) - Timeline.Favourites -> throw IllegalArgumentException("can't add to tab: $timeline") + Timeline.Favourites -> TabViewData( + timeline = timeline, + text = R.string.title_favourites, + icon = R.drawable.ic_favourite_filled_24dp, + fragment = { TimelineFragment.newInstance(timeline) }, + ) is Timeline.User.Pinned -> throw IllegalArgumentException("can't add to tab: $timeline") is Timeline.User.Posts -> throw IllegalArgumentException("can't add to tab: $timeline") is Timeline.User.Replies -> throw IllegalArgumentException("can't add to tab: $timeline") diff --git a/app/src/main/res/drawable/ic_favourite_filled_24dp.xml b/app/src/main/res/drawable/ic_favourite_filled_24dp.xml new file mode 100644 index 000000000..333cefebd --- /dev/null +++ b/app/src/main/res/drawable/ic_favourite_filled_24dp.xml @@ -0,0 +1,5 @@ + + + + +