修改帖子再次编辑修改成功后的闪退问题

This commit is contained in:
lyr
2021-06-16 17:58:15 +08:00
parent 7f2145d0ef
commit 0894957d73

View File

@ -18,10 +18,7 @@ import com.gh.base.fragment.BaseDialogFragment
import com.gh.base.fragment.BaseDialogWrapperFragment
import com.gh.base.fragment.BaseFragment
import com.gh.common.AppExecutor
import com.gh.common.util.DisplayUtils
import com.gh.common.util.NotificationHelper
import com.gh.common.util.TextHelper
import com.gh.common.util.dip2px
import com.gh.common.util.*
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.NotificationUgc
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
@ -67,8 +64,12 @@ class ArticleTagsSelectFragment : BaseFragment<String>() {
val intent = Intent()
mViewModel?.detailEntity?.me?.articleDraft = null
intent.putExtra(ArticleDetailEntity::class.java.simpleName, mViewModel?.detailEntity)
intent.putExtra("article_id", JSONObject(it).optString("_id"))
intent.putExtra("community_id", mViewModel?.mSelectCommunityData?.id)
if (mViewModel?.detailEntity == null) {
tryWithDefaultCatch {
intent.putExtra("article_id", JSONObject(it).optString("_id"))
intent.putExtra("community_id", mViewModel?.mSelectCommunityData?.id)
}
}
activity?.setResult(Activity.RESULT_OK, intent)
} else {
activity?.setResult(Activity.RESULT_OK)