fix profile delete file

This commit is contained in:
Kr328 committed 2019-12-07 07:39:23 +08:00
1 parent 845f1b37ca
commit 5e69959cf5
1 file changed
+3
@@ -17,6 +17,7 @@ import com.github.kr328.clash.model.ClashProfile
import com.github.kr328.clash.service.data.ClashProfileEntity
import com.google.android.material.snackbar.Snackbar
import kotlinx.android.synthetic.main.activity_profiles.*
import java.io.File
import java.io.FileOutputStream
import java.net.InetSocketAddress
import java.net.Proxy
@@ -140,6 +141,8 @@ class ProfilesActivity : BaseActivity() {
private fun removeProfile(profile: ClashProfileEntity) {
runClash {
it.profileService.removeProfile(profile.id)
File(profile.file).delete()
}
}