一键连更改
This commit is contained in:
parent
a063a4753e
commit
654f28c2cd
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -200,33 +200,8 @@ 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))
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}else{
|
|
||||||
showLoading(resources.getString(R.string.Starting), requireContext())
|
|
||||||
launch {
|
|
||||||
delay(2000)
|
|
||||||
startClash()
|
|
||||||
}
|
|
||||||
getDelayData()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun stopClash() {
|
|
||||||
context?.stopClashService()
|
|
||||||
}
|
|
||||||
private fun startClash() {
|
|
||||||
if (checkExpire()) {
|
|
||||||
if (isAdded) {
|
|
||||||
hideLoading()
|
|
||||||
MaterialDialog(requireContext()).show {
|
MaterialDialog(requireContext()).show {
|
||||||
this.cancelable(false)
|
this.cancelable(false)
|
||||||
cornerRadius(res = R.dimen.dp_10)
|
cornerRadius(res = R.dimen.dp_10)
|
||||||
|
|
@ -244,7 +219,20 @@ open class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dis
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
showLoading(resources.getString(R.string.Starting), requireContext())
|
||||||
|
startClash()
|
||||||
|
getDelayData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun stopClash() {
|
||||||
|
context?.stopClashService()
|
||||||
|
}
|
||||||
|
private fun startClash() {
|
||||||
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) {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue