Skip to content

Commit d7d0649

Browse files
committed
remove redundant list
1 parent ba6057e commit d7d0649

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

app/src/main/java/io/github/saeeddev94/xray/activity/MainActivity.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
6060
private lateinit var binding: ActivityMainBinding
6161
private lateinit var profileAdapter: ProfileAdapter
6262
private val profilesRecyclerView by lazy { findViewById<RecyclerView>(R.id.profilesRecyclerView) }
63-
64-
private lateinit var list: List<ProfileList>
6563
private val profiles = arrayListOf<ProfileList>()
6664

6765
private val notificationPermission = registerForActivityResult(RequestPermission()) {
@@ -149,7 +147,9 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
149147
}
150148
lifecycleScope.launch {
151149
lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) {
152-
profileViewModel.profiles.collectLatest { onNewList(it) }
150+
profileViewModel.profiles.collectLatest {
151+
profileViewModel.next(linkViewModel.activeTab)
152+
}
153153
}
154154
}
155155
intent?.data?.let { deepLink ->
@@ -243,11 +243,6 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
243243
profileAdapter.notifyDataSetChanged()
244244
}
245245

246-
private fun onNewList(value: List<ProfileList>) {
247-
list = value
248-
profileViewModel.next(linkViewModel.activeTab)
249-
}
250-
251246
private fun vpnStartStatus() {
252247
isRunning = true
253248
binding.toggleButton.text = getString(R.string.vpnStop)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy