Skip to content

Commit

Permalink
Some more slight improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Mar 28, 2024
1 parent 32d2606 commit b85f7a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public class DescriptionFragment extends BaseDescriptionFragment {
@State
StreamInfo streamInfo;


public DescriptionFragment(final StreamInfo streamInfo) {
this.streamInfo = streamInfo;
}


@Nullable
@Override
protected Description getDescription() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ public class ChannelAboutFragment extends BaseDescriptionFragment {
@State
protected ChannelInfo channelInfo;

public static ChannelAboutFragment getInstance(final @NonNull ChannelInfo channelInfo) {
final ChannelAboutFragment fragment = new ChannelAboutFragment();
fragment.channelInfo = channelInfo;
return fragment;
ChannelAboutFragment(@NonNull final ChannelInfo channelInfo) {
this.channelInfo = channelInfo;
}


Expand All @@ -42,10 +40,7 @@ protected void initViews(final View rootView, final Bundle savedInstanceState) {
@Nullable
@Override
protected Description getDescription() {
return new Description(
channelInfo.getDescription(),
Description.PLAIN_TEXT
);
return new Description(channelInfo.getDescription(), Description.PLAIN_TEXT);
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private void updateTabs() {
if (ChannelTabHelper.showChannelTab(
context, preferences, R.string.show_channel_tabs_about)) {
tabAdapter.addFragment(
ChannelAboutFragment.getInstance(currentInfo),
new ChannelAboutFragment(currentInfo),
context.getString(R.string.channel_tab_about));
}
}
Expand Down

0 comments on commit b85f7a6

Please sign in to comment.