Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
530
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
5f94a252
Commit
5f94a252
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
StorageBrowser: Prevent IllegalStateException
parent
71d43fe5
No related branches found
No related tags found
No related merge requests found
Pipeline
#5279
passed with stage
in 27 minutes and 44 seconds
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.kt
+3
-3
3 additions, 3 deletions
...rc/org/videolan/vlc/gui/browser/StorageBrowserFragment.kt
with
3 additions
and
3 deletions
vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.kt
+
3
−
3
View file @
5f94a252
...
...
@@ -106,7 +106,7 @@ class StorageBrowserFragment : FileBrowserFragment(), EntryPointsEventsCb, Corou
}
override
fun
onRestart
()
{
launch
{
(
adapter
as
StorageBrowserAdapter
).
updateListState
(
requireContext
())
}
launch
{
if
(
isAdded
)
(
adapter
as
StorageBrowserAdapter
).
updateListState
(
requireContext
())
}
}
override
fun
onStop
()
{
...
...
@@ -151,9 +151,9 @@ class StorageBrowserFragment : FileBrowserFragment(), EntryPointsEventsCb, Corou
override
fun
onCtxClick
(
v
:
View
,
position
:
Int
,
item
:
MediaLibraryItem
)
{
if
(
isRootDirectory
)
{
val
storage
=
adapter
.
getItem
(
position
)
as
Storage
coroutineScope
.
launch
{
launch
{
val
isCustom
=
viewModel
.
customDirectoryExists
(
storage
.
uri
.
path
)
if
(
isCustom
)
showContext
(
requireActivity
(),
this
@StorageBrowserFragment
,
position
,
item
.
title
,
CTX_CUSTOM_REMOVE
)
if
(
isCustom
&&
isAdded
)
showContext
(
requireActivity
(),
this
@StorageBrowserFragment
,
position
,
item
.
title
,
CTX_CUSTOM_REMOVE
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
006f35f7
·
5 years ago
mentioned in commit
006f35f7
mentioned in commit 006f35f774adb2accc3d33dee98bdef73b630d07
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment