Skip to content

Commit fd09e61

Browse files
committed
# Fixed Feed Group Titlebar
- use default fragment_feed_title for TabName - only clear FeedFragment bar subtitle when it matches the groupName to clear.
1 parent 279caac commit fd09e61

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,12 @@ class FeedFragment : BaseStateFragment<FeedState>() {
269269

270270
override fun onDestroyOptionsMenu() {
271271
super.onDestroyOptionsMenu()
272-
activity?.supportActionBar?.subtitle = null
272+
if (
273+
(groupName != "") &&
274+
(activity?.supportActionBar?.subtitle == groupName)
275+
) {
276+
activity?.supportActionBar?.subtitle = null
277+
}
273278
}
274279

275280
override fun onDestroy() {
@@ -281,7 +286,13 @@ class FeedFragment : BaseStateFragment<FeedState>() {
281286
}
282287

283288
super.onDestroy()
284-
activity?.supportActionBar?.subtitle = null
289+
290+
if (
291+
(groupName != "") &&
292+
(activity?.supportActionBar?.subtitle == groupName)
293+
) {
294+
activity?.supportActionBar?.subtitle = null
295+
}
285296
}
286297

287298
override fun onDestroyView() {

app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ public int getTabId() {
687687

688688
@Override
689689
public String getTabName(final Context context) {
690-
return feedGroupName;
690+
return context.getString(R.string.fragment_feed_title);
691691
}
692692

693693
@DrawableRes

0 commit comments

Comments
 (0)