Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Browser White
Commits
122246be
Commit
122246be
authored
Aug 29, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
665edc94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
SearchRecordUtils.kt
...ain/java/com/base/browserwhite/utils/SearchRecordUtils.kt
+23
-0
No files found.
app/src/main/java/com/base/browserwhite/utils/SearchRecordUtils.kt
View file @
122246be
...
@@ -4,4 +4,27 @@ object SearchRecordUtils {
...
@@ -4,4 +4,27 @@ object SearchRecordUtils {
const
val
SEARCH_RECORD_SP_KEY
=
"SEARCH_RECORD_SP_KEY"
const
val
SEARCH_RECORD_SP_KEY
=
"SEARCH_RECORD_SP_KEY"
private
fun
getSearchRecord
():
List
<
String
>
{
val
sp
=
AppPreferences
.
getInstance
().
getString
(
SEARCH_RECORD_SP_KEY
,
""
)
return
if
(
sp
.
equals
(
""
))
{
listOf
()
}
else
{
sp
.
split
(
","
)
}
}
fun
deleteSearchRecord
(
value
:
String
)
{
val
list
=
getSearchRecord
().
toMutableList
()
list
.
remove
(
value
)
val
string
=
list
.
joinToString
(
separator
=
","
)
AppPreferences
.
getInstance
().
put
(
SEARCH_RECORD_SP_KEY
,
string
)
}
fun
clearSearchRecord
()
{
AppPreferences
.
getInstance
().
put
(
SEARCH_RECORD_SP_KEY
,
""
)
}
}
}
\ No newline at end of file
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