we no longer need that
This commit is contained in:
parent
b0d86f0a67
commit
3e1631908a
2 changed files with 2 additions and 10 deletions
|
@ -60,8 +60,6 @@ import eu.m724.vastapp.activity.dashboard.DashboardActivity
|
|||
import eu.m724.vastapp.ui.theme.VastappTheme
|
||||
import eu.m724.vastapp.vastai.data.User
|
||||
import kotlinx.coroutines.launch
|
||||
import org.chromium.net.CronetEngine
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class LoginActivity : ComponentActivity() {
|
||||
private lateinit var dashboardLauncher: ActivityResultLauncher<Intent>
|
||||
|
@ -73,9 +71,7 @@ class LoginActivity : ComponentActivity() {
|
|||
ActivityResultContracts.StartActivityForResult()
|
||||
) { _ -> finish() } // TODO re-login here
|
||||
|
||||
val executor = Executors.newSingleThreadExecutor()
|
||||
val cronetEngine = CronetEngine.Builder(baseContext).build()
|
||||
val loginViewModel = LoginViewModel(application, cronetEngine, executor)
|
||||
val loginViewModel = LoginViewModel(application)
|
||||
|
||||
// load api key if saved
|
||||
loginViewModel.init()
|
||||
|
|
|
@ -12,13 +12,9 @@ import kotlinx.coroutines.flow.StateFlow
|
|||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import org.chromium.net.CronetEngine
|
||||
import java.util.concurrent.Executor
|
||||
|
||||
class LoginViewModel(
|
||||
application: Application,
|
||||
private val cronetEngine: CronetEngine,
|
||||
private val executor: Executor
|
||||
application: Application
|
||||
) : AndroidViewModel(application) {
|
||||
private val _uiState: MutableStateFlow<LoginUiState> =
|
||||
MutableStateFlow(LoginUiState.Idle)
|
||||
|
|
Loading…
Reference in a new issue