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