wjc
2024-12-03 4c111f5659d7e8872ad91316127326de9a9f6162
app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
@@ -14,7 +14,7 @@
import com.hdl.photovoltaic.enums.ShowErrorMode;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.ConfirmationExceptionDialog;
import com.hdl.photovoltaic.widget.FlashingBoxDialog;
import com.hdl.photovoltaic.widget.FlashingIconBoxDialog;
/**
 * 线程逻辑
@@ -166,21 +166,21 @@
        HdlThreadLogic.runMainThread(new Runnable() {
            @Override
            public void run() {
                FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(context, millisecond);
                FlashingIconBoxDialog flashingIconBoxDialog = new FlashingIconBoxDialog(context, millisecond);
                if (isBoolean) {
                    Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_succeed);
                    flashingBoxDialog.setImage(drawable);
                    flashingIconBoxDialog.setImage(drawable);
                } else {
                    Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_fail);
                    flashingBoxDialog.setImage(drawable);
                    flashingIconBoxDialog.setImage(drawable);
                }
                if (code == 0) {
                    //成功不需要增加状态码
                    flashingBoxDialog.setContent(msg);
                    flashingIconBoxDialog.setContent(msg);
                } else {
                    flashingBoxDialog.setContent(msg + "(" + code + ")");
                    flashingIconBoxDialog.setContent(msg + "(" + code + ")");
                }
                flashingBoxDialog.show();
                flashingIconBoxDialog.show();
            }
        }, null, null);
    }