修改程序默认为激活状态。
This commit is contained in:
parent
c1d7202dad
commit
1bd64b0d27
|
@ -136,7 +136,8 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
AppSettings.Setting.Token,
|
||||
userData.data.token
|
||||
)
|
||||
GlobalMethod.isActive = userData.data.activation
|
||||
//从服务器获取用户的激活信息。
|
||||
// GlobalMethod.isActive = userData.data.activation
|
||||
//更新本地激活时间
|
||||
val expirationTime = userData.data.expirationTime
|
||||
val time = ServerConfiguration.toLongTime(expirationTime)
|
||||
|
@ -181,6 +182,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
|
||||
}.show()
|
||||
}
|
||||
|
||||
"找不到用户" -> {
|
||||
setErrorAndInput(
|
||||
viewBinding.accountView,
|
||||
|
@ -189,6 +191,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
)
|
||||
|
||||
}
|
||||
|
||||
"找不到邮箱" -> {
|
||||
setErrorAndInput(
|
||||
viewBinding.accountView,
|
||||
|
@ -197,6 +200,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
)
|
||||
|
||||
}
|
||||
|
||||
"密码错误" -> {
|
||||
setErrorAndInput(
|
||||
viewBinding.passwordView,
|
||||
|
@ -204,6 +208,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
viewBinding.passwordInputLayout
|
||||
)
|
||||
}
|
||||
|
||||
"请更改登录设备" -> {
|
||||
viewBinding.button.isEnabled = false
|
||||
verification(
|
||||
|
@ -274,6 +279,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
|
||||
})
|
||||
}
|
||||
|
||||
else -> {
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
|
|
|
@ -707,8 +707,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||
}
|
||||
|
||||
startViewModel.isActivationLiveData.observe(this) {
|
||||
GlobalMethod.isActive = it
|
||||
initNavigationMenu(it)
|
||||
// GlobalMethod.isActive = it
|
||||
initNavigationMenu(GlobalMethod.isActive)
|
||||
}
|
||||
|
||||
startViewModel.verifyErrorMsgLiveData.observe(this) {
|
||||
|
|
|
@ -81,15 +81,20 @@ class AllUnitsFragment(
|
|||
fun openEditActivity(file: SourceFile) {
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
executorService.submit {
|
||||
val bundle = Bundle()
|
||||
val path = file.file.absolutePath
|
||||
bundle.putString("path", path)
|
||||
bundle.putString("modPath", modClass!!.modFile.absolutePath)
|
||||
addFileToHistory(file, handler = handler, whenAddComplete = {
|
||||
val intent = Intent(requireContext(), EditActivity::class.java)
|
||||
intent.putExtra("data", bundle)
|
||||
requireActivity().startActivity(intent)
|
||||
})
|
||||
if (modClass == null) {
|
||||
Snackbar.make(viewBinding.unitList, R.string.file_not_exist, Snackbar.LENGTH_SHORT)
|
||||
.show()
|
||||
} else {
|
||||
val bundle = Bundle()
|
||||
val path = file.file.absolutePath
|
||||
bundle.putString("path", path)
|
||||
bundle.putString("modPath", modClass?.modFile?.absolutePath)
|
||||
addFileToHistory(file, handler = handler, whenAddComplete = {
|
||||
val intent = Intent(requireContext(), EditActivity::class.java)
|
||||
intent.putExtra("data", bundle)
|
||||
requireActivity().startActivity(intent)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ object GlobalMethod {
|
|||
/**
|
||||
* 是否为激活状态
|
||||
*/
|
||||
var isActive = false
|
||||
var isActive = true
|
||||
const val DEFAULT_GAME_PACKAGE = "com.corrodinggames.rts"
|
||||
const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a"
|
||||
const val RELEASE_SIGN = "5320b24894fe7ed449842a81a2dfceda"
|
||||
|
|
Loading…
Reference in New Issue
Block a user