mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-23 07:14:24 +01:00
Fix snackbar crash when on old Android versions (#7361)
This commit is contained in:
parent
aa28a65222
commit
279d37e8bb
@ -84,9 +84,11 @@ public class FeedInfoFragment extends Fragment implements MaterialToolbar.OnMenu
|
||||
android.content.ClipboardManager cm = (android.content.ClipboardManager) getContext()
|
||||
.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
cm.setPrimaryClip(clipData);
|
||||
if (Build.VERSION.SDK_INT <= 32) {
|
||||
if (Build.VERSION.SDK_INT <= 32 && getActivity() instanceof MainActivity) {
|
||||
((MainActivity) getActivity()).showSnackbarAbovePlayer(R.string.copied_to_clipboard,
|
||||
Snackbar.LENGTH_SHORT);
|
||||
} else if (Build.VERSION.SDK_INT <= 32) {
|
||||
Snackbar.make(getView(), R.string.copied_to_clipboard, Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user