diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-01-26 18:16:26 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-01-26 18:16:26 +0100 |
commit | e4affdc9d776415d0763c90af160cfca6ef11b01 (patch) | |
tree | 0e68b8547d03f2252e3686e2f240031161ccf286 | |
parent | 90a6a6ceaaf59cb3e3e30887e63e2dad25a8157a (diff) |
Fix a crash
-rw-r--r-- | app/src/main/res/layouts/peertube/layout/activity_main_peertube.xml | 1 | ||||
-rw-r--r-- | app/src/playstore/java/app/fedilab/android/activities/BasePeertubeActivity.java | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/app/src/main/res/layouts/peertube/layout/activity_main_peertube.xml b/app/src/main/res/layouts/peertube/layout/activity_main_peertube.xml index 971a87fcd..9e8bd2e11 100644 --- a/app/src/main/res/layouts/peertube/layout/activity_main_peertube.xml +++ b/app/src/main/res/layouts/peertube/layout/activity_main_peertube.xml @@ -154,6 +154,7 @@ android:id="@+id/nav_view" android:layout_width="match_parent" android:layout_height="wrap_content" + app:labelVisibilityMode="unlabeled" android:layout_marginStart="0dp" android:layout_marginEnd="0dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/playstore/java/app/fedilab/android/activities/BasePeertubeActivity.java b/app/src/playstore/java/app/fedilab/android/activities/BasePeertubeActivity.java index 7b3b01faf..f45ab4f31 100644 --- a/app/src/playstore/java/app/fedilab/android/activities/BasePeertubeActivity.java +++ b/app/src/playstore/java/app/fedilab/android/activities/BasePeertubeActivity.java @@ -158,15 +158,19 @@ public class BasePeertubeActivity extends BaseBarActivity { @Override protected void onResume() { - mCastContext.getSessionManager().addSessionManagerListener( - mSessionManagerListener, CastSession.class); + if (mCastContext != null) { + mCastContext.getSessionManager().addSessionManagerListener( + mSessionManagerListener, CastSession.class); + } super.onResume(); } @Override protected void onPause() { - mCastContext.getSessionManager().removeSessionManagerListener( - mSessionManagerListener, CastSession.class); + if (mCastContext != null) { + mCastContext.getSessionManager().removeSessionManagerListener( + mSessionManagerListener, CastSession.class); + } super.onPause(); } |