【光环助手V5.5.0】同步正式环境后测试问题汇总(12(1)) https://git.shanqu.cc/pm/halo-app-issues/-/issues/1656
This commit is contained in:
@ -38,6 +38,10 @@ class GamesCollectionEntity(
|
||||
var time: TimeEntity? = null,
|
||||
@Ignore
|
||||
var status: String = "",// draft/pending/pass/failed
|
||||
|
||||
//本地字段
|
||||
@Ignore
|
||||
var isLocalDraft: Boolean = false
|
||||
) : Parcelable {
|
||||
|
||||
fun getStatusLabelRes(): Int {
|
||||
|
||||
@ -139,7 +139,7 @@ class GameCollectionEditActivity : ToolBarActivity() {
|
||||
|
||||
mViewModel.gameCollectionPatch?.run {
|
||||
mViewModel.imageUrl = cover
|
||||
if (status.isNotEmpty() && (status != "draft" || display == "self_only")) {
|
||||
if (status != "draft" && !isLocalDraft) {
|
||||
setNavigationTitle("编辑游戏单")
|
||||
}
|
||||
initPosterUI()
|
||||
@ -204,6 +204,7 @@ class GameCollectionEditActivity : ToolBarActivity() {
|
||||
mViewModel.draftLiveData.observe(this) {
|
||||
mViewModel.gameCollectionPatch = it.convertGameCollectionEntity()
|
||||
mViewModel.gameCollectionPatch?.run {
|
||||
isLocalDraft = true
|
||||
initData(false)
|
||||
mViewModel.tags = tags ?: arrayListOf()
|
||||
initTagsUI(mViewModel.tags)
|
||||
@ -301,12 +302,12 @@ class GameCollectionEditActivity : ToolBarActivity() {
|
||||
|
||||
override fun handleBackPressed(): Boolean {
|
||||
val patch = mViewModel.gameCollectionPatch
|
||||
if (patch != null && patch.status.isNotEmpty() && (patch.status != "draft" || patch.display == "self_only")) {
|
||||
if (patch != null && patch.status != "draft" && !patch.isLocalDraft) {
|
||||
DialogHelper.showDialog(this, "温馨提示", "退出将不会保留本次游戏单编辑的内容,是否确定退出", "确定", "取消", {
|
||||
finish()
|
||||
}, extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true))
|
||||
return true
|
||||
} else {
|
||||
} else if (patch == null || patch.isLocalDraft) {
|
||||
val games = mChooseGamesViewModel.chooseGamesLiveData.value ?: arrayListOf()
|
||||
val title = mBinding.gameCollectionTitleEt.text.toString()
|
||||
val introduce = mBinding.gameCollectionIntroduceEt.text.toString()
|
||||
@ -371,6 +372,7 @@ class GameCollectionEditActivity : ToolBarActivity() {
|
||||
|
||||
val patch = mViewModel.gameCollectionPatch
|
||||
if (patch != null
|
||||
&& !patch.isLocalDraft
|
||||
&& !mBinding.selfOnlyCb.isChecked
|
||||
&& games.size < 8
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user