feat: 畅玩助手问题反馈相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-779
This commit is contained in:
@ -82,7 +82,9 @@ class VFeedbackDialogFragment : BaseDialogFragment() {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
mBinding.submitTv.setOnClickListener {
|
||||
mViewModel.postFeedback(mGame!!.id, mBinding.feedbackEt.text.toString(), getSelectedTagString())
|
||||
mGame?.run {
|
||||
mViewModel.postFeedback(this, mBinding.feedbackEt.text.toString(), getSelectedTagString())
|
||||
}
|
||||
NewFlatLogUtils.logHaloFunGameExitDialogSubmitClick(
|
||||
mGame?.id ?: "",
|
||||
mBinding.feedbackEt.text.toString(),
|
||||
@ -192,7 +194,16 @@ class VFeedbackDialogFragment : BaseDialogFragment() {
|
||||
|
||||
class VFeedbackViewModel : ViewModel() {
|
||||
|
||||
fun postFeedback(gameId: String, message: String, tags: ArrayList<String>) {
|
||||
fun postFeedback(game: GameEntity, message: String, tags: ArrayList<String>) {
|
||||
val processedMessage = StringBuilder().apply {
|
||||
append(game.name)
|
||||
game.getApk().safelyGetInRelease(0)?.version?.run {
|
||||
append("-$this")
|
||||
}
|
||||
if (message.isNotBlank()) {
|
||||
append("-$message")
|
||||
}
|
||||
}
|
||||
val json = json {
|
||||
"from" to ""
|
||||
"ghversion" to PackageUtils.getGhVersionName()
|
||||
@ -206,8 +217,8 @@ class VFeedbackDialogFragment : BaseDialogFragment() {
|
||||
"rom" to RomIdentifier.getRom().name + " " + RomIdentifier.getRom().versionName
|
||||
|
||||
"suggestion_type" to "畅玩问题"
|
||||
"game_id" to gameId
|
||||
"message" to message
|
||||
"game_id" to game.id
|
||||
"message" to processedMessage
|
||||
"tags" to JSONArray(tags)
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,6 @@ import io.reactivex.schedulers.Schedulers
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
object VHelper {
|
||||
|
||||
@ -781,7 +780,8 @@ object VHelper {
|
||||
ApkEntity(
|
||||
packageName = downloadEntity.packageName,
|
||||
url = downloadEntity.url,
|
||||
platform = downloadEntity.platform
|
||||
platform = downloadEntity.platform,
|
||||
version = downloadEntity.versionName
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user