光环助手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:
@ -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(), " ").replace("[\r\n]".toRegex(), "<br/>")
|
||||
mBaseHandler.post { mRichEditor.insertHtml(text) }
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user