|
|
@@ -4,6 +4,7 @@ import android.app.Activity;
|
|
|
import android.content.Context;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
@@ -65,7 +66,24 @@ public class MagnetAdapter extends BaseQuickAdapter<MagnetBean, BaseViewHolder>
|
|
|
.setPositiveButton(StringTool.getString(R.string.confirm), (DialogInterface dialog, int which) -> {
|
|
|
dialog.dismiss();
|
|
|
|
|
|
- ActivityTool.openUrl((Activity) mContext, "https://tb.jiuxinban.com/6Fq9k9");
|
|
|
+ String zfb = UserInfoManager.getInstance().getSystemBean().zfb;
|
|
|
+ if (TextUtils.isEmpty(zfb)) {
|
|
|
+ ToastTool.showShort(StringTool.getString(R.string.about_upgrade_not_available));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ int index = zfb.indexOf(";");
|
|
|
+ String adLink;
|
|
|
+ if ((index+1) == zfb.length()) {
|
|
|
+ adLink = null;
|
|
|
+ } else {
|
|
|
+ adLink = zfb.substring(index+1);
|
|
|
+ }
|
|
|
+ if (TextUtils.isEmpty(adLink)) {
|
|
|
+ ToastTool.showShort(StringTool.getString(R.string.about_upgrade_not_available));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ ActivityTool.openUrl((Activity) mContext, adLink);
|
|
|
// 是广告模式,看完广告之后,自动下载
|
|
|
if (mContext instanceof BaseBeiActivity) {
|
|
|
((BaseBeiActivity) mContext).showLoading();
|