fix: Crash with isInPreviewMode()

This commit is contained in:
Pun Butrach
2025-12-13 17:32:30 +07:00
parent 71c8851f70
commit d2793a321a
@@ -320,7 +320,8 @@ public class QsbContainerView extends FrameLayout {
protected View getDefaultView(ViewGroup container, boolean showSetupIcon) {
// Return a default widget with setup icon.
View v = QsbWidgetHostView.getDefaultView(container);
if (showSetupIcon) {
// pE-TODO(??): Why are we using isInPreviewMode() check to prevent crash?
if (showSetupIcon && !isInPreviewMode()) {
requestQsbCreate();
View setupButton = v.findViewById(R.id.btn_qsb_setup);
setupButton.setVisibility(View.VISIBLE);