修复一些闪退问题

This commit is contained in:
chenjuntao
2019-06-10 10:03:18 +08:00
parent ab0d341bca
commit 62f184f6ea
3 changed files with 10 additions and 7 deletions

View File

@ -5,6 +5,7 @@ import android.app.NotificationManager
import android.content.Context
import com.gh.base.CurrentActivityHolder
import com.gh.common.util.SPUtils
import com.gh.common.util.tryWithDefaultCatch
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.MessageActivity
@ -128,11 +129,13 @@ object ImManager {
fun sendFeedbackMessage(message: String) {
val fromToMessage = IMMessage.createTxtMessage(message)
HaloApp.getInstance().mainExecutor.execute {
IMChat.getInstance().sendMessage(fromToMessage, object : ChatListener {
override fun onProgress(p0: Int) {}
override fun onSuccess() {}
override fun onFailed() {}
})
tryWithDefaultCatch {
IMChat.getInstance().sendMessage(fromToMessage, object : ChatListener {
override fun onProgress(p0: Int) {}
override fun onSuccess() {}
override fun onFailed() {}
})
}
}
}

View File

@ -525,7 +525,7 @@ public class NewsDetailActivity extends BaseActivity implements OnClickListener,
float Y2 = Math.abs(Y12 - Y22);
float R2 = (X2 * X2) + (Y2 * Y2);
double R12 = Math.sqrt(R2);
if (isSecondDown) {
if (adapter != null && isSecondDown) {
if ((R11 - R12) > scrollSize && fontsize > 1) {
fontsize--;
adapter.setFontSize(fontsize);

View File

@ -258,9 +258,9 @@ class QuestionEditActivity : BaseActivity() {
}
override fun onDestroy() {
super.onDestroy()
mProcessingDialog?.dismissAllowingStateLoss()
mProcessingDialog = null
super.onDestroy()
}
override fun onSaveInstanceState(outState: Bundle?) {