|
|
@@ -2,7 +2,6 @@ package com.yingyangfly.home.activity
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
import android.text.TextUtils
|
|
|
-import android.util.Log
|
|
|
import android.view.MotionEvent
|
|
|
import android.view.View
|
|
|
import androidx.recyclerview.widget.GridLayoutManager
|
|
|
@@ -12,7 +11,6 @@ import com.bumptech.glide.Glide
|
|
|
import com.tencent.imsdk.v2.*
|
|
|
import com.yingyang.home.R
|
|
|
import com.yingyang.home.databinding.ActivityHomeBinding
|
|
|
-import com.yingyangfly.baselib.bean.GetSaveGameRecordBean
|
|
|
import com.yingyangfly.baselib.bean.MessageBean
|
|
|
import com.yingyangfly.baselib.bean.Record
|
|
|
import com.yingyangfly.baselib.db.VoicePlayerBean
|
|
|
@@ -34,7 +32,6 @@ import com.yingyangfly.home.component.ShowPlayPorpoiseViewComponent
|
|
|
import com.yingyangfly.home.component.ShowProfessionalEvaluationViewComponent
|
|
|
import com.yingyangfly.home.dialog.DownLoadAppFragment
|
|
|
import com.yingyangfly.home.utils.AnimUtil
|
|
|
-import gorden.rxbus2.Subscribe
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -557,11 +554,6 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
}
|
|
|
|
|
|
private fun initLiveData() {
|
|
|
- //上报游戏进度
|
|
|
- LiveEventBusUtil.observer<GetSaveGameRecordBean>(this, RxBusCodes.REPORTGAMERECORDS) {
|
|
|
- saveData(it)
|
|
|
- }
|
|
|
-
|
|
|
//语音合成
|
|
|
LiveEventBusUtil.observer<String>(this, RxBusCodes.SPEECHSYNTHESIS) {
|
|
|
if (TextUtils.isEmpty(it).not()) {
|
|
|
@@ -596,21 +588,6 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 保存游戏进度
|
|
|
- */
|
|
|
- private fun saveData(bean: GetSaveGameRecordBean) {
|
|
|
- if (bean != null) {
|
|
|
- viewModel.saveGameRecord(bean, fail = {
|
|
|
- Log.e("wpp", "游戏保存成功2")
|
|
|
- }, success = {
|
|
|
- Log.e("wpp", "游戏保存成功3")
|
|
|
- })
|
|
|
- } else {
|
|
|
- Log.e("wpp", "游戏保存失败,bean不能为空")
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 语音合成
|
|
|
*/
|
|
|
@@ -670,7 +647,7 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
super.onRecvNewMessage(msg)
|
|
|
runOnUiThread {
|
|
|
if (msg.isRead.not()) {
|
|
|
- makeMessageAsRead(msg)
|
|
|
+// makeMessageAsRead(msg)
|
|
|
if (msg.elemType == V2TIMMessage.V2TIM_ELEM_TYPE_CUSTOM) {
|
|
|
val customElem = msg.customElem
|
|
|
if (customElem != null && customElem.data != null) {
|
|
|
@@ -707,8 +684,6 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
LiveEventBusUtil.send(RxBusCodes.SHOWTASKDIALOG, messageBean)
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
- Log.e("wpp", "自定义消息--------------------------解析失败")
|
|
|
}
|
|
|
}
|
|
|
}
|