Resolve program discovery visibility issue for the guest user
@@ -178,18 +178,24 @@ public class MainDiscoveryFragment extends BaseFragment {
if (fragment == null || !fragment.isHidden()) {
return;
}
+ // Use commitNow() method to perform the FragmentManager transaction synchronously
+ // instated of commit(), otherwise program discovery screen is not visible to the guest user
+ // in case of deep linking.
getChildFragmentManager().beginTransaction()
.show(fragment)
- .commit();
+ .commitNow();
}
private void hideFragment(@Nullable Fragment fragment) {
if (fragment == null || fragment.isHidden()) {
return;
}
+ // Use commitNow() method to perform the FragmentManager transaction synchronously
+ // instated of commit(), otherwise program discovery screen is not visible to the guest user
+ // in case of deep linking.
getChildFragmentManager().beginTransaction()
.hide(fragment)
- .commit();
+ .commitNow();
}
private void addTabItem(@IdRes int id, @StringRes int label) {
