mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 19:12:45 +01:00
Merge pull request #625 from coffeemakr/fix-nullpointer-in-background-handler
Check if view still exists in UICallback
This commit is contained in:
commit
d210b600d7
@ -1225,12 +1225,16 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
public boolean handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case BackgroundCallback.MESSAGE_DESCRIPTION:
|
||||
if (videoDescriptionView != null) {
|
||||
videoDescriptionView.setText((Spanned) msg.obj);
|
||||
videoDescriptionView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return true;
|
||||
case BackgroundCallback.MESSAGE_UPLOADER_DATE:
|
||||
if (videoUploadDateView != null) {
|
||||
videoUploadDateView.setText((String) msg.obj);
|
||||
videoUploadDateView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user