mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix crash when opening reactions bottom sheet.
This commit is contained in:
committed by
Greyson Parrelli
parent
fd6a2c6b10
commit
6919e352d6
@@ -57,7 +57,13 @@ public final class ReactionsBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
callback = (Callback) context;
|
||||
if (context instanceof Callback) {
|
||||
callback = (Callback) context;
|
||||
} else if (getParentFragment() instanceof Callback) {
|
||||
callback = (Callback) getParentFragment();
|
||||
} else {
|
||||
throw new IllegalStateException("Parent component does not implement Callback");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user