|
@@ -49,6 +49,7 @@ import com.cooleshow.base.utils.AppUtils;
|
|
|
import com.cooleshow.base.utils.HeadsetPlugListener;
|
|
|
import com.cooleshow.base.utils.HeadsetPlugReceiver;
|
|
|
import com.cooleshow.base.utils.PermissionUtils;
|
|
|
+import com.cooleshow.base.utils.ToastUtil;
|
|
|
import com.cooleshow.base.utils.ToastUtils;
|
|
|
import com.cooleshow.base.websocket.JWebSocketClient;
|
|
|
import com.cooleshow.base.widgets.BaseDialog;
|
|
@@ -1401,7 +1402,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
public void onResult(SHARE_MEDIA platform) {
|
|
|
|
|
|
if (platform.name().equals("WEIXIN_FAVORITE")) {
|
|
|
- ToastUtils.showShort("收藏成功啦");
|
|
|
+ ToastUtil.getInstance().showShort("收藏成功啦");
|
|
|
} else {
|
|
|
if (platform != SHARE_MEDIA.MORE && platform != SHARE_MEDIA.SMS
|
|
|
&& platform != SHARE_MEDIA.EMAIL
|
|
@@ -1415,7 +1416,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
&& platform != SHARE_MEDIA.GOOGLEPLUS
|
|
|
&& platform != SHARE_MEDIA.YNOTE
|
|
|
&& platform != SHARE_MEDIA.EVERNOTE) {
|
|
|
- ToastUtils.showShort("分享成功啦");
|
|
|
+ ToastUtil.getInstance().showShort("分享成功啦");
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1435,7 +1436,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
&& platform != SHARE_MEDIA.GOOGLEPLUS
|
|
|
&& platform != SHARE_MEDIA.YNOTE
|
|
|
&& platform != SHARE_MEDIA.EVERNOTE) {
|
|
|
- ToastUtils.showShort("分享失败啦");
|
|
|
+ ToastUtil.getInstance().showShort("分享失败啦");
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1443,7 +1444,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
|
|
|
@Override
|
|
|
public void onCancel(SHARE_MEDIA platform) {
|
|
|
- ToastUtils.showShort("分享取消了");
|
|
|
+ ToastUtil.getInstance().showShort("分享取消了");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1516,7 +1517,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
midiFileDuration = obj.optLong("duration");
|
|
|
processInterval = obj.optInt("interval", 16);
|
|
|
if (TextUtils.isEmpty(midiFile)) {
|
|
|
- ToastUtils.showShort("文件异常");
|
|
|
+ ToastUtil.getInstance().showShort("文件异常");
|
|
|
return;
|
|
|
}
|
|
|
new RxPermissions(this)
|
|
@@ -1526,7 +1527,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
try {
|
|
|
String type = midiFile.substring(midiFile.lastIndexOf(".") + 1);
|
|
|
if (TextUtils.isEmpty(type)) {
|
|
|
- ToastUtils.showShort("文件异常");
|
|
|
+ ToastUtil.getInstance().showShort("文件异常");
|
|
|
return;
|
|
|
}
|
|
|
String path = FileUtils.getPublicDirectory("file");
|
|
@@ -1574,7 +1575,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
});
|
|
|
} else {
|
|
|
runOnUiThread(() -> {
|
|
|
- ToastUtils.showShort("获取文件失败");
|
|
|
+ ToastUtil.getInstance().showShort("获取文件失败");
|
|
|
midiFilePath = null;
|
|
|
onSendMessage(message.toString());
|
|
|
});
|
|
@@ -1585,7 +1586,7 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
public void onError(Throwable e) {
|
|
|
runOnUiThread(() -> {
|
|
|
hideLoading();
|
|
|
- ToastUtils.showShort("文件异常");
|
|
|
+ ToastUtil.getInstance().showShort("文件异常");
|
|
|
midiFilePath = null;
|
|
|
onSendMessage(message.toString());
|
|
|
});
|
|
@@ -1914,11 +1915,11 @@ public class AccompanyFragment extends BaseMVPFragment<FragmentAccompanyBinding,
|
|
|
// 判断resultStatus 为9000则代表支付成功
|
|
|
if (TextUtils.equals(resultStatus, "9000")) {
|
|
|
// 该笔订单是否真实支付成功,需要依赖服务端的异步通知。
|
|
|
- ToastUtils.showShort("支付成功");
|
|
|
+ ToastUtil.getInstance().showShort("支付成功");
|
|
|
sendPayResult(Constants.PAY_SUCCESS);
|
|
|
} else {
|
|
|
// 该笔订单真实的支付结果,需要依赖服务端的异步通知。
|
|
|
- ToastUtils.showShort("支付失败" + resultStatus);
|
|
|
+ ToastUtil.getInstance().showShort("支付失败" + resultStatus);
|
|
|
sendPayResult(Constants.PAY_ERROR);
|
|
|
}
|
|
|
break;
|