光环助手V3.6.3 RELEASE(20190328-1930)测试问题汇总(前端)(5.6.7.8.13) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/480

This commit is contained in:
kehaoyuan
2019-03-31 15:21:12 +08:00
parent cef4432d97
commit 9cc9b09861
7 changed files with 26 additions and 27 deletions

View File

@ -157,9 +157,10 @@ abstract class BaseRichEditorActivity : BaseActivity() {
fun onPaste() {
val clipboard =
HaloApp.getInstance().application.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
if (!TextUtils.isEmpty(clipboard.text.toString())) {
val clipText = clipboard.text.toString()
if (!TextUtils.isEmpty(clipText)) {
// 替换换行符号否则 插入失败
val text = clipboard.text.toString().replace("[\r\n]".toRegex(), "")
val text = clipText.replace("[ ]".toRegex(), "&nbsp;").replace("[\r\n]".toRegex(), "<br/>")
mBaseHandler.post { mRichEditor.insertHtml(text) }
}
}

View File

@ -1,12 +1,12 @@
package com.gh.gamecenter.db;
import android.content.Context;
import android.text.TextUtils;
import com.gh.gamecenter.db.info.AskSearchHistoryInfo;
import com.j256.ormlite.dao.CloseableIterator;
import com.j256.ormlite.dao.Dao;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -20,15 +20,17 @@ public class AskSearchHistoryDao {
try {
helper = DatabaseHelper.getHelper(context);
dao = helper.getDao(AskSearchHistoryInfo.class);
} catch (SQLException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
public void add(String key, String communityId) {
try {
dao.createOrUpdate(createInfo(key, communityId));
} catch (SQLException e) {
if (!TextUtils.isEmpty(key) && !TextUtils.isEmpty(communityId)) {
dao.createOrUpdate(createInfo(key, communityId));
}
} catch (Exception e) {
e.printStackTrace();
}
@ -41,9 +43,10 @@ public class AskSearchHistoryDao {
where().eq("communityId", communityId).
query();
for (AskSearchHistoryInfo next : his) {
if (next.getKey().equals(key)) dao.delete(next);
String dbKey = next.getKey();
if (dbKey != null && dbKey.equals(key)) dao.delete(next);
}
} catch (SQLException e) {
} catch (Exception e) {
e.printStackTrace();
}
@ -55,7 +58,7 @@ public class AskSearchHistoryDao {
while (iterator.hasNext()) {
try {
dao.delete(iterator.next());
} catch (SQLException e) {
} catch (Exception e) {
e.printStackTrace();
}
@ -75,7 +78,7 @@ public class AskSearchHistoryDao {
while (hisIterator.hasNext()) {
history.add(hisIterator.next().getKey());
}
} catch (SQLException e) {
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -102,7 +102,6 @@ class AnswerEditActivity : BaseRichEditorActivity() {
private var mProcessingDialog: WaitingDialogFragment? = null
private var mUploadImageCancelDialog: Dialog? = null
private var postDialog: WaitingDialogFragment? = null
private var mQuestionsTitle: String? = null
private var mCommunityName: String? = null
@ -308,14 +307,11 @@ class AnswerEditActivity : BaseRichEditorActivity() {
private fun readyPost() {
CheckLoginUtils.checkLogin(this, "回答编辑-提交") {
postDialog = WaitingDialogFragment.newInstance(getString(R.string.vote_post))
postDialog?.show(supportFragmentManager, null)
val answerContent = getReplaceNetImageContent()
// filter rule
val answerLength = answerContent.length
if (answerLength < MIN_ANSWER_TEXT_LENGTH) {
toast(R.string.answer_beneath_length_limit)
postDialog?.dismiss()
return@checkLogin
} else if (answerLength > MAX_ANSWER_TEXT_LENGTH) {
DialogUtils.showAlertDialog(this,
@ -326,7 +322,6 @@ class AnswerEditActivity : BaseRichEditorActivity() {
getString(R.string.answer_resume_edit), "", {
// do nothing
}, null)
postDialog?.dismiss()
return@checkLogin
}
Utils.log("answerEditHtml:$answerContent")

View File

@ -23,6 +23,7 @@ class HotFragmentAdapter(context: Context, val list: List<CommunityHotSearch>)
}
override fun getItemCount(): Int {
if (list.size > 8) return 8 // 最多显示8个
return list.size
}

View File

@ -127,7 +127,7 @@ class HottestAdapter(context: Context,
is ColumnViewHolder -> {
val entity = mEntityList[position]
holder.binding.data = entity
holder.binding.columnSkip.setOnClickListener {
holder.itemView.setOnClickListener {
mContext.startActivity(CommunitySubjectActivity.getIntent(mContext,
UserManager.getInstance().community,
entity.id, mEntrance,
@ -137,7 +137,7 @@ class HottestAdapter(context: Context,
is SpecialColumnViewHolder -> {
val entity = mEntityList[position]
holder.binding.data = entity
holder.binding.specialColumnSkip.setOnClickListener {
holder.itemView.setOnClickListener {
mContext.startActivity(AskColumnDetailActivity.getIntentByColumnId(mContext,
entity.id,
UserManager.getInstance().community,