Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery 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
Data Recovery White
Commits
9c03d581
Commit
9c03d581
authored
Jul 12, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
b0f17ae9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
FileScanResultActivity.kt
.../datarecovery/activity/recovery/FileScanResultActivity.kt
+8
-10
No files found.
app/src/main/java/com/base/datarecovery/activity/recovery/FileScanResultActivity.kt
View file @
9c03d581
...
@@ -166,6 +166,7 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
...
@@ -166,6 +166,7 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
binding
.
tvScanning
.
text
=
"Completed"
binding
.
tvScanning
.
text
=
"Completed"
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@FileScanResultActivity
,
isShowDialog
=
false
)
{}
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@FileScanResultActivity
,
isShowDialog
=
false
)
{}
binding
.
ivEmpty
.
isVisible
=
pathList
.
isEmpty
()
binding
.
ivEmpty
.
isVisible
=
pathList
.
isEmpty
()
setAdapterData
(
null
)
dialogClass
.
finishScan
{
dialogClass
.
finishScan
{
scanDialog
.
dismiss
()
scanDialog
.
dismiss
()
}
}
...
@@ -176,32 +177,29 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
...
@@ -176,32 +177,29 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
private
val
pathList
=
ArrayList
<
String
>()
private
val
pathList
=
ArrayList
<
String
>()
private
val
hashMap
=
HashMap
<
String
,
ArrayList
<
RecoveryBean
>>()
private
val
hashMap
=
HashMap
<
String
,
ArrayList
<
RecoveryBean
>>()
private
fun
setAdapterData
(
path
:
String
)
{
private
fun
setAdapterData
(
path
:
String
?
=
null
)
{
val
flag
=
path
?.
let
{
addMapFolder
(
it
)
}
?:
true
val
flag
=
addMapFolder
(
path
)
if
(
flag
)
{
if
(
flag
)
{
binding
.
tvFolderNumber
.
text
=
hashMap
.
keys
.
size
.
toString
()
binding
.
tvFolderNumber
.
text
=
hashMap
.
keys
.
size
.
toString
()
val
mapList
=
hashMap
.
map
{
val
mapList
=
hashMap
.
map
{
val
folderName
=
it
.
key
.
split
(
"/"
).
last
()
FolderBean
(
it
.
key
,
recoveryList
=
it
.
value
)
FolderBean
(
folderName
,
recoveryList
=
it
.
value
)
}
}
fileFolderAdapter
.
setData
(
mapList
)
fileFolderAdapter
.
setData
(
mapList
)
}
else
{
binding
.
tvFileNumber
.
text
=
hashMap
.
values
.
sumOf
{
it
.
size
}.
toString
()
}
}
}
}
private
fun
addMapFolder
(
path
:
String
):
Boolean
{
private
fun
addMapFolder
(
path
:
String
):
Boolean
{
val
folder
=
File
(
path
).
parent
?:
""
var
isNewFolder
=
false
val
folder
=
File
(
path
).
parent
?.
split
(
"/"
)
?.
last
()
?:
""
if
(
hashMap
[
folder
]
==
null
)
{
if
(
hashMap
[
folder
]
==
null
)
{
hashMap
[
folder
]
=
arrayListOf
()
hashMap
[
folder
]
=
arrayListOf
()
return
true
isNewFolder
=
true
}
}
val
recoveryBean
=
RecoveryBean
(
path
)
val
recoveryBean
=
RecoveryBean
(
path
)
if
(
scanType
==
SCAN_DOCUMENTS
)
{
if
(
scanType
==
SCAN_DOCUMENTS
)
{
recoveryBean
.
setType
()
recoveryBean
.
setType
()
}
}
hashMap
[
folder
]
?.
add
(
recoveryBean
)
hashMap
[
folder
]
?.
add
(
recoveryBean
)
return
false
return
isNewFolder
}
}
}
}
\ 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