Skip to content

Commit

Permalink
Refactor: Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghai committed Apr 16, 2024
1 parent 6b5c02c commit bf5815a
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class FileListFragment : Fragment(), BreadcrumbLayout.Listener, FileListAdapter.
var path = argsPath
val intent = args.intent
var pickOptions: PickOptions? = null
when (val action = intent.action ?: Intent.ACTION_VIEW) {
when (val action = intent.action) {
Intent.ACTION_GET_CONTENT, Intent.ACTION_OPEN_DOCUMENT,
Intent.ACTION_CREATE_DOCUMENT -> {
val mode = if (action == Intent.ACTION_CREATE_DOCUMENT) {
Expand Down Expand Up @@ -324,13 +324,6 @@ class FileListFragment : Fragment(), BreadcrumbLayout.Listener, FileListAdapter.
Environment.DIRECTORY_DOWNLOADS
).path
)
Intent.ACTION_VIEW ->
if (path != null) {
val mimeType = intent.type?.asMimeTypeOrNull()
if (mimeType != null && path.isArchiveFile(mimeType)) {
path = path.createArchiveRootPath()
}
}
else ->
if (path != null) {
val mimeType = intent.type?.asMimeTypeOrNull()
Expand Down

0 comments on commit bf5815a

Please sign in to comment.