一键连更改

This commit is contained in:
level 2025-07-15 15:26:24 +08:00
parent a063a4753e
commit 654f28c2cd
4 changed files with 23 additions and 36 deletions

View File

@ -319,13 +319,12 @@ class SettingActivity : BaseActivity() {
startActivity(intent) startActivity(intent)
} }
findViewById<View>(R.id.clChushihua).setOnClickListener { findViewById<View>(R.id.clChushihua).setOnClickListener {
android.util.Log.i("AAAAAAAA","data:::"+subUrl)
if (checkExpire()) { if (checkExpire()) {
RxToast.info(resources.getString(R.string.AccountExpired)) RxToast.info(resources.getString(R.string.AccountExpired))
RxToast.success(resources.getString(R.string.tooFast))
return@setOnClickListener return@setOnClickListener
} }
if (TextUtils.isEmpty(subUrl)){ if (TextUtils.isEmpty(subUrl)){
RxToast.success(resources.getString(R.string.tooFast))
return@setOnClickListener return@setOnClickListener
} }
showLoading(resources.getString(R.string.UnderRepair), this@SettingActivity) showLoading(resources.getString(R.string.UnderRepair), this@SettingActivity)

View File

@ -200,21 +200,28 @@ open class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dis
rxDialogSureCancel.show() rxDialogSureCancel.show()
} else { } else {
android.util.Log.i("NewAccFragment::","data isSubbed::: "+ isSubbed)
if (checkExpire()) { if (checkExpire()) {
if (isAdded) { if (isAdded) {
RxToast.info(resources.getString(R.string.AccountExpired)) MaterialDialog(requireContext()).show {
this.cancelable(false)
cornerRadius(res = R.dimen.dp_10)
customView(
R.layout.expired_recharge__layout,
scrollable = false,
noVerticalPadding = true,
horizontalPadding = false
)
getCustomView().findViewById<TextView>(R.id.tv_pay_finish).setOnClickListener {
goNewRecharge()
dismiss()
}
}
} }
return return
}else{
showLoading(resources.getString(R.string.Starting), requireContext())
launch {
delay(2000)
startClash()
}
getDelayData()
} }
showLoading(resources.getString(R.string.Starting), requireContext())
startClash()
getDelayData()
} }
} }
} }
@ -224,27 +231,8 @@ open class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dis
context?.stopClashService() context?.stopClashService()
} }
private fun startClash() { private fun startClash() {
if (checkExpire()) {
if (isAdded) {
hideLoading()
MaterialDialog(requireContext()).show {
this.cancelable(false)
cornerRadius(res = R.dimen.dp_10)
customView(
R.layout.expired_recharge__layout,
scrollable = false,
noVerticalPadding = true,
horizontalPadding = false
)
getCustomView().findViewById<TextView>(R.id.tv_pay_finish).setOnClickListener {
goNewRecharge()
dismiss()
}
}
}
return
}
launch { launch {
delay(2000)
NewMainActivity.profileBinder?.let { pm -> NewMainActivity.profileBinder?.let { pm ->
val active = pm.queryActive() val active = pm.queryActive()
if (active == null) { if (active == null) {

View File

@ -5,8 +5,8 @@ android:color="#BFD5D5D5" >
<shape> <shape>
<gradient android:type="linear" <gradient android:type="linear"
android:angle="180" android:angle="180"
android:startColor="#E6ECFF" android:startColor="#FFF3E5"
android:endColor="@color/white" android:endColor="#FFF3E5"
/> />
</shape> </shape>
</item> </item>

View File

@ -10,7 +10,7 @@
android:textStyle="bold" android:textStyle="bold"
android:gravity="center" android:gravity="center"
android:textSize="18sp" android:textSize="18sp"
android:textColor="@color/blue_4072FE" android:textColor="#B36C1B"
android:text="@string/TimeOver" android:text="@string/TimeOver"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -24,7 +24,7 @@
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:background="@drawable/activity_jump_bg" android:background="@drawable/oc_login_bg"
android:textColor="@color/white" android:textColor="@color/white"
android:gravity="center" android:gravity="center"
android:paddingLeft="20dp" android:paddingLeft="20dp"