|
|
|
@ -1,7 +1,6 @@ |
|
|
|
|
package com.gyf.csams.account.model |
|
|
|
|
|
|
|
|
|
import android.app.Application |
|
|
|
|
import android.content.Intent |
|
|
|
|
import android.os.Build |
|
|
|
|
import androidx.lifecycle.AndroidViewModel |
|
|
|
|
import androidx.lifecycle.LiveData |
|
|
|
@ -12,7 +11,6 @@ import com.gyf.csams.AccountApi |
|
|
|
|
import com.gyf.csams.Api |
|
|
|
|
import com.gyf.csams.R |
|
|
|
|
import com.gyf.csams.account.ui.AccountRoute |
|
|
|
|
import com.gyf.csams.main.ui.MainActivity |
|
|
|
|
import com.gyf.csams.util.AppDatabase |
|
|
|
|
import com.gyf.csams.util.SimpleCallback |
|
|
|
|
import com.gyf.csams.util.Token |
|
|
|
@ -269,7 +267,6 @@ class AccountViewModel(application: Application) : AndroidViewModel(application) |
|
|
|
|
TokenManager.token = it |
|
|
|
|
db?.tokenDao()?.save(token = it) |
|
|
|
|
}.invokeOnCompletion { |
|
|
|
|
context.startActivity(Intent(context, MainActivity::class.java)) |
|
|
|
|
_finishLogin.postValue(true) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|