Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
81b467e8
Commit
81b467e8
authored
Jul 13, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改代码
parent
27a8bddb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
HotSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
+11
-6
No files found.
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
View file @
81b467e8
...
...
@@ -44,15 +44,20 @@ import kotlinx.android.synthetic.main.consultant_item_expert_hot_search.view.*
@Route
(
path
=
"/consult/hot_search"
)
class
HotSearchActivity
:
BaseMvpActivity
<
IHotSearchContract
.
View
,
IHotSearchContract
.
Presenter
>(),
IHotSearchContract
.
View
{
private
lateinit
var
searchWordsAdapter
:
SearchWordsAdapter
private
val
searchSuggestList
:
ArrayList
<
SearchSuggestListBean
>
=
ArrayList
()
private
var
mSearchContent
:
String
=
""
private
val
CACHE_CONSULT_SEARCH_HISTORY_DATA
=
"cache_consult_search_history_data"
private
val
HOT_SEARCH_DOCTOR_NAME
=
"hot_search_doctor_name"
private
val
JUMP_WORD
=
"jump_word"
private
var
historyList
:
FixSizeLinkedList
<
String
>
=
FixSizeLinkedList
(
15
)
private
val
bannerList
=
ArrayList
<
String
>()
companion
object
{
private
const
val
CACHE_CONSULT_SEARCH_HISTORY_DATA
=
"cache_consult_search_history_data"
private
const
val
HOT_SEARCH_DOCTOR_NAME
=
"hot_search_doctor_name"
private
const
val
JUMP_WORD
=
"jump_word"
}
//历史搜索内容的最大宽度
private
var
maxWidth
:
Int
=
0
...
...
@@ -254,9 +259,9 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
relatedWords
=
searchWordsBean
.
search_suggests
[
0
].
suggest_content
}
}
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
()
&&
searchWordsBean
.
search_suggests
?
.
get
(
if
(!
searchWordsBean
.
search_suggests
.
isNullOrEmpty
()
&&
searchWordsBean
.
search_suggests
.
get
(
0
)
?.
suggest_types
?
.
contains
(
JUMP_WORD
)
)
.
suggest_types
.
contains
(
JUMP_WORD
)
)
{
//将数据增加到历史搜索中
if
(!
TextUtils
.
isEmpty
(
searchContent
))
{
...
...
@@ -323,7 +328,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
override
fun
searchHotWordData
(
wordList
:
MutableList
<
FunctionWordBean
>)
{
//热门词搜索结果
if
(
null
==
wordList
||
wordList
.
isEmpty
())
{
if
(
wordList
.
isEmpty
())
{
llHotSearch
.
visibility
=
View
.
GONE
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment