Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20e3f366 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

ignore logic

parent f31c1757
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -355,11 +355,17 @@ class MainActivity : AppCompatActivity() {
        EventBus.events.filter { appEvent ->
            appEvent is AppEvent.TooManyRequests
        }.collectLatest {
            if (!viewModel.shouldShowSessionError) return@collectLatest

            binding.sessionErrorLayout.visibility = View.VISIBLE
            binding.retrySessionButton.setOnClickListener {
                binding.sessionErrorLayout.visibility = View.GONE
                loginViewModel.startLoginFlow(listOf(PlayStoreAuthenticator::class.java.simpleName))
            }
            binding.ignoreSessionButton.setOnClickListener {
                binding.sessionErrorLayout.visibility = View.GONE
                viewModel.shouldShowSessionError = false
            }
        }
    }

+2 −0
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@ class MainActivityViewModel @Inject constructor(

    lateinit var connectivityManager: ConnectivityManager

    var shouldShowSessionError = true

    fun getUser(): User {
        return appLoungeDataStore.getUserType()
    }