光环助手V3.7.0-问答社区相关(9-12)
This commit is contained in:
@ -62,7 +62,7 @@ class MeEntity(@SerializedName("is_community_voted")
|
||||
@SerializedName(value = "is_answer_commented", alternate = ["is_community_article_commented", "is_video_commented"])
|
||||
var isAnswerCommented: Boolean = false,
|
||||
|
||||
@SerializedName("is_answer_comment_voted", alternate = ["is_video_comment_voted"])
|
||||
@SerializedName("is_answer_comment_voted", alternate = ["is_video_comment_voted", "is_community_article_comment_voted"])
|
||||
var isAnswerCommentVoted: Boolean = false,
|
||||
|
||||
@SerializedName("is_version_requested")
|
||||
|
||||
@ -618,9 +618,10 @@ class AnswerDetailFragment : NormalFragment() {
|
||||
override fun onMenuItemClick(menuItem: MenuItem) {
|
||||
when (menuItem.itemId) {
|
||||
R.id.menu_more -> mViewModel.answerDetail?.let { showMoreItemDialog(it) }
|
||||
R.id.menu_question_and_answer->{
|
||||
R.id.menu_question_and_answer -> {
|
||||
HaloApp.remove(GameDetailAnswerAdapter.GAME_DETAIL_COME_IN)
|
||||
DirectUtils.directToCommunity(context!!, null)
|
||||
val community = mViewModel.answerDetail?.community
|
||||
DirectUtils.directToCommunity(context!!, community)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -655,6 +656,7 @@ class AnswerDetailFragment : NormalFragment() {
|
||||
}
|
||||
dialog.show()
|
||||
|
||||
val homeContainer = view.findViewById<View>(R.id.container_home)
|
||||
val reportContainer = view.findViewById<View>(R.id.container_report)
|
||||
val commentControlContainer = view.findViewById<View>(R.id.container_comment_control)
|
||||
if (answer.me.isModerator) {
|
||||
@ -666,6 +668,7 @@ class AnswerDetailFragment : NormalFragment() {
|
||||
}
|
||||
}
|
||||
|
||||
reportContainer.visibility = if (answer.me.isAnswerOwn) View.GONE else View.VISIBLE
|
||||
if (answer.me.isAnswerOwn) {
|
||||
commentControlContainer.visibility = View.VISIBLE
|
||||
val commentControlTv = commentControlContainer.findViewById<TextView>(R.id.tv_comment_control)
|
||||
@ -688,6 +691,10 @@ class AnswerDetailFragment : NormalFragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
homeContainer.setOnClickListener {
|
||||
val community = mViewModel.answerDetail?.community
|
||||
DirectUtils.directToCommunity(context!!, community)
|
||||
}
|
||||
|
||||
reportContainer.setOnClickListener {
|
||||
dialog.dismiss()
|
||||
|
||||
@ -269,9 +269,10 @@ class ArticleDetailActivity : BaseActivity() {
|
||||
if (mViewModel.detailEntity != null) {
|
||||
when (item?.itemId) {
|
||||
R.id.menu_more -> showMoreItemDialog()
|
||||
R.id.menu_question_and_answer->{
|
||||
R.id.menu_question_and_answer -> {
|
||||
HaloApp.remove(GAME_DETAIL_COME_IN)
|
||||
DirectUtils.directToCommunity(this, null)
|
||||
val community = mViewModel.articleLiveData.value?.data?.community
|
||||
DirectUtils.directToCommunity(this, community)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -540,6 +541,7 @@ class ArticleDetailActivity : BaseActivity() {
|
||||
}
|
||||
dialog.show()
|
||||
|
||||
val homeContainer = view.findViewById<View>(R.id.container_home)
|
||||
val reportContainer = view.findViewById<View>(R.id.container_report)
|
||||
val reportTv = view.findViewById<TextView>(R.id.tv_report)
|
||||
val reportIv = view.findViewById<ImageView>(R.id.iv_report)
|
||||
@ -592,6 +594,10 @@ class ArticleDetailActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
homeContainer.setOnClickListener {
|
||||
val community = mViewModel.articleLiveData.value?.data?.community
|
||||
DirectUtils.directToCommunity(this, community)
|
||||
}
|
||||
|
||||
reportContainer.setOnClickListener {
|
||||
dialog.dismiss()
|
||||
|
||||
@ -354,10 +354,15 @@ class QuestionsDetailFragment :
|
||||
window.attributes = lp
|
||||
}
|
||||
dialog.show()
|
||||
val moreItemHome = view.findViewById<View>(R.id.more_item_home)
|
||||
val item1 = view.findViewById<View>(R.id.more_item1)
|
||||
val item2 = view.findViewById<View>(R.id.more_item2)
|
||||
val managerItem = view.findViewById<View>(R.id.more_manager)
|
||||
item1.visibility=if (mQuestionsDetailEntity!!.me.isQuestionOwn) View.GONE else View.VISIBLE
|
||||
managerItem.visibility = if (mQuestionsDetailEntity!!.me.isModerator) View.VISIBLE else View.GONE
|
||||
moreItemHome.setOnClickListener {
|
||||
DirectUtils.directToCommunity(context!!, null)
|
||||
}
|
||||
item1.setOnClickListener {
|
||||
dialog.dismiss()
|
||||
// 跳转意见反馈
|
||||
|
||||
Reference in New Issue
Block a user