Do not crash when clicking button while feed is not loaded yet

This commit is contained in:
ByteHamster 2022-04-09 16:18:50 +02:00
parent b751ad2aa4
commit 52809976a0
1 changed files with 4 additions and 0 deletions

View File

@ -173,6 +173,8 @@ public class ItemFragment extends Fragment {
&& UsageStatistics.hasSignificantBiasTo(UsageStatistics.ACTION_STREAM)) { && UsageStatistics.hasSignificantBiasTo(UsageStatistics.ACTION_STREAM)) {
showOnDemandConfigBalloon(true); showOnDemandConfigBalloon(true);
return; return;
} else if (actionButton1 == null) {
return; // Not loaded yet
} }
actionButton1.onClick(getContext()); actionButton1.onClick(getContext());
}); });
@ -181,6 +183,8 @@ public class ItemFragment extends Fragment {
&& UsageStatistics.hasSignificantBiasTo(UsageStatistics.ACTION_DOWNLOAD)) { && UsageStatistics.hasSignificantBiasTo(UsageStatistics.ACTION_DOWNLOAD)) {
showOnDemandConfigBalloon(false); showOnDemandConfigBalloon(false);
return; return;
} else if (actionButton2 == null) {
return; // Not loaded yet
} }
actionButton2.onClick(getContext()); actionButton2.onClick(getContext());
}); });