资源化配置Bobulltoon数据地址。
This commit is contained in:
parent
31595fe1ae
commit
840da14438
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Apr 14 11:50:54 GMT 2025
|
||||
#Mon Apr 14 12:09:37 GMT 2025
|
||||
stageCount=8
|
||||
libraryProject=
|
||||
baseVersion=15.2
|
||||
publishVersion=15.2.7
|
||||
buildCount=12
|
||||
buildCount=14
|
||||
baseBetaVersion=15.2.8
|
||||
|
@ -233,17 +233,19 @@ public class SettingsActivity extends AppCompatActivity implements IWinBollActiv
|
||||
ToastUtils.show("悬浮窗已开启");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onResetBoBullToonURL(View view) {
|
||||
Rules.getInstance(this).resetDefaultBoBullToonURL();
|
||||
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
||||
etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
|
||||
}
|
||||
|
||||
public void onDownloadBoBullToon(View view) {
|
||||
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
||||
if(!etBoBullToonURL.getText().toString().trim().equals(Rules.getInstance(this).getBoBullToonURL())) {
|
||||
if (!etBoBullToonURL.getText().toString().trim().equals(Rules.getInstance(this).getBoBullToonURL())) {
|
||||
Rules.getInstance(this).setBoBullToonURL(etBoBullToonURL.getText().toString().trim());
|
||||
}
|
||||
|
||||
|
||||
final TomCat tomCat = TomCat.getInstance(this);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
|
@ -14,8 +14,7 @@ import cc.winboll.studio.contacts.utils.IntUtils;
|
||||
public class SettingsModel extends BaseBean {
|
||||
|
||||
public static final String TAG = "SettingsModel";
|
||||
public static final String DEFAULT_BOBULLTOON_URL = "http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip"; // 替换为实际的 ZIP 文件 URL
|
||||
|
||||
|
||||
public static final int MAX_INTRANGE = 666666;
|
||||
public static final int MIN_INTRANGE = 1;
|
||||
|
||||
@ -38,7 +37,7 @@ public class SettingsModel extends BaseBean {
|
||||
this.dunResumeSecondCount = 60;
|
||||
this.dunResumeCount = 1;
|
||||
this.isEnableDun = false;
|
||||
this.szBoBullToon_URL = DEFAULT_BOBULLTOON_URL;
|
||||
this.szBoBullToon_URL = "";
|
||||
}
|
||||
|
||||
public SettingsModel(int dunTotalCount, int dunCurrentCount, int dunResumeSecondCount, int dunResumeCount, boolean isEnableDun, String szBoBullToon_URL) {
|
||||
|
@ -6,6 +6,7 @@ package cc.winboll.studio.contacts.bobulltoon;
|
||||
* @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。
|
||||
*/
|
||||
import android.content.Context;
|
||||
import cc.winboll.studio.contacts.R;
|
||||
import cc.winboll.studio.contacts.dun.Rules;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
@ -43,6 +44,10 @@ public class TomCat {
|
||||
}
|
||||
return _TomCat;
|
||||
}
|
||||
|
||||
public String getDefaultBobulltoonUrl() {
|
||||
return mContext.getString(R.string.default_bobulltoon_url);
|
||||
}
|
||||
|
||||
boolean downloadAndExtractZip(String zipUrl, String destinationFolder) throws IOException {
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
|
@ -18,6 +18,7 @@ import java.util.ArrayList;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Pattern;
|
||||
import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
||||
|
||||
public class Rules {
|
||||
|
||||
@ -85,7 +86,7 @@ public class Rules {
|
||||
}
|
||||
|
||||
public void resetDefaultBoBullToonURL() {
|
||||
mSettingsModel.setBoBullToon_URL(SettingsModel.DEFAULT_BOBULLTOON_URL);
|
||||
mSettingsModel.setBoBullToon_URL(TomCat.getInstance(mContext).getDefaultBobulltoonUrl());
|
||||
saveDun();
|
||||
}
|
||||
|
||||
|
@ -2,5 +2,6 @@
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Contacts</string>
|
||||
<string name="default_bobulltoon_url">http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user