bug fix :1.缓存数据退出登录未清理

This commit is contained in:
level 2025-06-25 18:37:34 +08:00
parent c2eff33c40
commit 8a28c1f17c
4 changed files with 41 additions and 3 deletions

View File

@ -62,6 +62,7 @@ class MineInfoActivity: BaseActivity() {
MMKV.defaultMMKV().removeValueForKey(BZYConstants.NODE_SELECTED_NAME_KEY)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_VPN_UserCommand)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.NODE_All_ITEM_NAME_KEY)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.PROFILE_SUB_URL)
NewMainActivity().stopUploadTimer()
mainAtyVM.stopHeartBeat()
cleanProfile()

View File

@ -941,6 +941,7 @@ class NewMainActivity : BaseActivity() {
MMKV.defaultMMKV().removeValueForKey(BZYConstants.NODE_SELECTED_NAME_KEY)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_VPN_UserCommand)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.NODE_All_ITEM_NAME_KEY)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.PROFILE_SUB_URL)
Log.d("cleanUserInfo clashRunning==>${clashRunning}")
if (clashRunning) {
fragments.filterIsInstance<NewAccFragment>().forEach { it.stopClash() }

View File

@ -306,7 +306,7 @@ class SettingActivity : BaseActivity() {
intent.putExtra(BZYConstants.EXTRA_KEY_AGREEMENT, BZYConstants.EXTRA_USER_AGREEMENT)
startActivity(intent)
}
findViewById<View>(R.id.ll_chushihua).setOnClickListener {
findViewById<View>(R.id.clChushihua).setOnClickListener {
if (TextUtils.isEmpty(NewMainActivity.subUrl)){
return@setOnClickListener
@ -322,7 +322,7 @@ class SettingActivity : BaseActivity() {
delay(1000)
if (NewMainActivity.subUrl?.isNotEmpty() == true) {
startTimer()
setSub2(NewMainActivity.subUrl!!,pm);
setSub2(NewMainActivity.subUrl!!,pm)
}
}
}

View File

@ -163,7 +163,6 @@
android:layout_marginEnd="21dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
>
<TextView
@ -200,6 +199,43 @@
app:layout_constraintEnd_toStartOf="@+id/aiSwitching"
app:layout_constraintTop_toTopOf="@+id/aiSwitching" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clChushihua"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clSwitching"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
>
<TextView
android:id="@+id/tvChushihua"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="@string/InitializationRepair"
android:textColor="#5A2B31"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aiChushihua"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/oc_xy"
app:layout_constraintBottom_toBottomOf="@+id/tvChushihua"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvChushihua" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout