Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect Android
Commits
5063f3d0
Commit
5063f3d0
authored
Mar 31, 2019
by
Nicolas Fella
Browse files
Use fancier lambda
parent
f1194e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
View file @
5063f3d0
...
...
@@ -418,15 +418,13 @@ public class MprisActivity extends AppCompatActivity {
});
positionSeekUpdateRunnable
=
()
->
{
BackgroundService
.
RunCommand
(
MprisActivity
.
this
,
service
->
{
if
(
targetPlayer
!=
null
)
{
positionBar
.
setProgress
((
int
)
(
targetPlayer
.
getPosition
()));
}
positionSeekUpdateHandler
.
removeCallbacks
(
positionSeekUpdateRunnable
);
positionSeekUpdateHandler
.
postDelayed
(
positionSeekUpdateRunnable
,
1000
);
});
};
positionSeekUpdateRunnable
=
()
->
BackgroundService
.
RunCommand
(
MprisActivity
.
this
,
service
->
{
if
(
targetPlayer
!=
null
)
{
positionBar
.
setProgress
((
int
)
(
targetPlayer
.
getPosition
()));
}
positionSeekUpdateHandler
.
removeCallbacks
(
positionSeekUpdateRunnable
);
positionSeekUpdateHandler
.
postDelayed
(
positionSeekUpdateRunnable
,
1000
);
});
positionSeekUpdateHandler
.
postDelayed
(
positionSeekUpdateRunnable
,
200
);
positionBar
.
setOnSeekBarChangeListener
(
new
SeekBar
.
OnSeekBarChangeListener
()
{
...
...
Write
Preview
Supports
Markdown
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