forked from mirrors/Fedilab
Fix a crash
This commit is contained in:
parent
90a6a6ceaa
commit
e4affdc9d7
2 changed files with 9 additions and 4 deletions
|
@ -154,6 +154,7 @@
|
||||||
android:id="@+id/nav_view"
|
android:id="@+id/nav_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:labelVisibilityMode="unlabeled"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -158,15 +158,19 @@ public class BasePeertubeActivity extends BaseBarActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
|
if (mCastContext != null) {
|
||||||
mCastContext.getSessionManager().addSessionManagerListener(
|
mCastContext.getSessionManager().addSessionManagerListener(
|
||||||
mSessionManagerListener, CastSession.class);
|
mSessionManagerListener, CastSession.class);
|
||||||
|
}
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
|
if (mCastContext != null) {
|
||||||
mCastContext.getSessionManager().removeSessionManagerListener(
|
mCastContext.getSessionManager().removeSessionManagerListener(
|
||||||
mSessionManagerListener, CastSession.class);
|
mSessionManagerListener, CastSession.class);
|
||||||
|
}
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue