一键连更改

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)
}
findViewById<View>(R.id.clChushihua).setOnClickListener {
android.util.Log.i("AAAAAAAA","data:::"+subUrl)
if (checkExpire()) {
RxToast.info(resources.getString(R.string.AccountExpired))
RxToast.success(resources.getString(R.string.tooFast))
return@setOnClickListener
}
if (TextUtils.isEmpty(subUrl)){
RxToast.success(resources.getString(R.string.tooFast))
return@setOnClickListener
}
showLoading(resources.getString(R.string.UnderRepair), this@SettingActivity)

View File

@ -200,21 +200,28 @@ open class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dis
rxDialogSureCancel.show()
} else {
android.util.Log.i("NewAccFragment::","data isSubbed::: "+ isSubbed)
if (checkExpire()) {
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
}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()
}
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 {
delay(2000)
NewMainActivity.profileBinder?.let { pm ->
val active = pm.queryActive()
if (active == null) {

View File

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

View File

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