Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
File Recovery RecycleBin
Commits
2ff920a0
Commit
2ff920a0
authored
Jul 19, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
bbff540d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
RecycleBinFragment.kt
...ase/filerecoveryrecyclebin/fragment/RecycleBinFragment.kt
+26
-16
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/fragment/RecycleBinFragment.kt
View file @
2ff920a0
...
@@ -15,7 +15,6 @@ import com.base.filerecoveryrecyclebin.databinding.FragmentRecycleBinBinding
...
@@ -15,7 +15,6 @@ import com.base.filerecoveryrecyclebin.databinding.FragmentRecycleBinBinding
import
com.base.filerecoveryrecyclebin.help.BaseFragment
import
com.base.filerecoveryrecyclebin.help.BaseFragment
import
com.base.filerecoveryrecyclebin.help.PermissionHelp.checkStorePermission
import
com.base.filerecoveryrecyclebin.help.PermissionHelp.checkStorePermission
import
com.base.filerecoveryrecyclebin.help.PermissionHelp.requestStorePermission
import
com.base.filerecoveryrecyclebin.help.PermissionHelp.requestStorePermission
import
com.base.filerecoveryrecyclebin.service.StayNotificationService
import
com.base.filerecoveryrecyclebin.utils.LogEx
import
com.base.filerecoveryrecyclebin.utils.LogEx
import
com.base.filerecoveryrecyclebin.view.DialogViews.showGerPermission
import
com.base.filerecoveryrecyclebin.view.DialogViews.showGerPermission
import
com.google.gson.Gson
import
com.google.gson.Gson
...
@@ -36,18 +35,18 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
...
@@ -36,18 +35,18 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
@RequiresApi
(
Build
.
VERSION_CODES
.
Q
)
@RequiresApi
(
Build
.
VERSION_CODES
.
Q
)
override
fun
setView
()
{
override
fun
setView
()
{
handler
=
Handler
(
requireActivity
().
mainLooper
)
{
message
->
//
handler = Handler(requireActivity().mainLooper) { message ->
if
(
message
.
what
==
99
)
{
//
if (message.what == 99) {
// LogEx.logDebug(TAG, "媒体库更新了")
//
//
LogEx.logDebug(TAG, "媒体库更新了")
initData
()
//
initData()
}
//
}
if
(
message
.
what
==
100
)
{
//
if (message.what == 100) {
// LogEx.logDebug(TAG, "回收站数据更新了")
//
//
LogEx.logDebug(TAG, "回收站数据更新了")
initData
()
//
initData()
}
//
}
true
//
true
}
//
}
StayNotificationService
.
mainHandler
=
handler
//
StayNotificationService.mainHandler = handler
recycleBinAdapter
=
RecycleBinAdapter
{
bean
->
recycleBinAdapter
=
RecycleBinAdapter
{
bean
->
...
@@ -58,9 +57,7 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
...
@@ -58,9 +57,7 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
binding
.
rv
.
adapter
=
recycleBinAdapter
binding
.
rv
.
adapter
=
recycleBinAdapter
val
launcher
=
(
requireActivity
()
as
MainActivity
).
launcher
val
launcher
=
(
requireActivity
()
as
MainActivity
).
launcher
if
(
requireActivity
().
checkStorePermission
())
{
if
(!
requireActivity
().
checkStorePermission
())
{
initData
()
}
else
{
requireContext
().
showGerPermission
(
allow
=
{
requireContext
().
showGerPermission
(
allow
=
{
requireContext
().
requestStorePermission
(
launcher
,
result
=
{
flag
->
requireContext
().
requestStorePermission
(
launcher
,
result
=
{
flag
->
if
(
flag
)
{
if
(
flag
)
{
...
@@ -109,5 +106,18 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
...
@@ -109,5 +106,18 @@ class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>() {
}
}
}
}
override
fun
onResume
()
{
super
.
onResume
()
LogEx
.
logDebug
(
TAG
,
"onResume"
)
if
(
requireContext
().
checkStorePermission
())
{
initData
()
}
}
override
fun
onPause
()
{
super
.
onPause
()
LogEx
.
logDebug
(
TAG
,
"onPause"
)
}
}
}
\ 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