Tweak PIP restore. Fix Library wunderbar value.

This commit is contained in:
Akinwale Ariwodola 2020-05-24 18:54:33 +01:00
parent 6840997793
commit a051a73c2b
2 changed files with 10 additions and 2 deletions

View file

@ -821,9 +821,16 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
}
findViewById(R.id.content_main).setVisibility(View.VISIBLE);
findViewById(R.id.floating_balance_main_container).setVisibility(inFullscreenMode ? View.INVISIBLE : View.VISIBLE);
Fragment fragment = getCurrentFragment();
boolean canShowFloatingBalance = fragment == null ||
fragment instanceof FollowingFragment ||
fragment instanceof FileViewFragment ||
fragment instanceof ChannelFragment ||
fragment instanceof EditorsChoiceFragment ||
fragment instanceof AllContentFragment ||
fragment instanceof LibraryFragment ||
fragment instanceof SearchFragment;
findViewById(R.id.floating_balance_main_container).setVisibility(!canShowFloatingBalance || inFullscreenMode ? View.INVISIBLE : View.VISIBLE);
if (!(fragment instanceof FileViewFragment) && !inFullscreenMode) {
findViewById(R.id.global_now_playing_card).setVisibility(View.VISIBLE);
}

View file

@ -213,6 +213,7 @@ public class LibraryFragment extends BaseFragment implements
super.onResume();
Context context = getContext();
Helper.setWunderbarValue(null, context);
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
LbryAnalytics.setCurrentScreen(activity, "Library", "Library");