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
7db3e06e
Commit
7db3e06e
authored
3 years ago
by
Robert Stone
Committed by
Nicolas Pomepuy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add extension to convert from boolean to integer
parent
a2561409
No related branches found
No related tags found
1 merge request
!1034
Update shuffle strategy and android auto behavior
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt
+2
-0
2 additions, 0 deletions
...ools/src/main/java/org/videolan/tools/KotlinExtensions.kt
with
2 additions
and
0 deletions
application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt
+
2
−
0
View file @
7db3e06e
...
...
@@ -55,6 +55,8 @@ fun View?.setGone() = setVisibility(View.GONE)
val
Int
.
dp
:
Int
get
()
=
(
this
*
Resources
.
getSystem
().
displayMetrics
.
density
).
toInt
()
val
Int
.
px
:
Int
get
()
=
(
this
/
Resources
.
getSystem
().
displayMetrics
.
density
).
toInt
()
fun
Boolean
.
toInt
()
=
if
(
this
)
1
else
0
fun
CoroutineScope
.
conflatedActor
(
time
:
Long
=
2000L
,
action
:
suspend
()
->
Unit
)
=
actor
<
Unit
>(
capacity
=
Channel
.
CONFLATED
)
{
for
(
evt
in
channel
)
{
action
()
...
...
This diff is collapsed.
Click to expand it.
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