Skip to content

Commit

Permalink
Fix #31
Browse files Browse the repository at this point in the history
  • Loading branch information
SaeedDev94 committed Sep 6, 2024
1 parent 3c0a08f commit 73b1b58
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
return true
}

private fun profileIntent(index: Int = -1, id: Long = 0L, name: String = "", config: String = ""): Intent {
return Intent(applicationContext, ProfileActivity::class.java).also {
it.putExtra("index", index)
it.putExtra("id", id)
if (name.isNotEmpty()) it.putExtra("name", name)
if (config.isNotEmpty()) it.putExtra("config", config)
}
}

private fun setVpnServiceStatus() {
if (!vpnServiceBound) return
if (vpnService.getIsRunning()) {
Expand Down Expand Up @@ -271,6 +262,15 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
}.show()
}

private fun profileIntent(index: Int = -1, id: Long = 0L, name: String = "", config: String = ""): Intent {
return Intent(applicationContext, ProfileActivity::class.java).also {
it.putExtra("index", index)
it.putExtra("id", id)
if (name.isNotEmpty()) it.putExtra("name", name)
if (config.isNotEmpty()) it.putExtra("config", config.replace("\\/", "/"))
}
}

private fun onProfileActivityResult(id: Long, index: Int) {
if (index == -1) {
Thread {
Expand Down

0 comments on commit 73b1b58

Please sign in to comment.