2
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-08-31 06:35:19 +00:00

BF-11894 : Fix the Duplicate menu options in ChannelFragment

This commit is contained in:
Harshita
2025-03-08 22:05:28 +05:30
committed by Siddhesh Naik
parent d321e57620
commit 54bf7f0ced

View File

@@ -232,6 +232,14 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
binding.subChannelTitleView.setOnClickListener(openSubChannel); binding.subChannelTitleView.setOnClickListener(openSubChannel);
} }
@Override
public void onDestroyView() {
super.onDestroyView();
if (menuProvider != null) {
activity.removeMenuProvider(menuProvider);
}
}
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
@@ -240,7 +248,6 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
} }
disposables.clear(); disposables.clear();
binding = null; binding = null;
activity.removeMenuProvider(menuProvider);
menuProvider = null; menuProvider = null;
} }