Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
533
Issue boards
Milestones
Wiki
Code
Merge requests
13
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
18e98f0d
Commit
18e98f0d
authored
6 years ago
by
Habib Kazemi
Committed by
Geoffrey Métais
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve code
Signed-off-by:
Geoffrey Métais
<
geoffrey.metais@gmail.com
>
parent
93638339
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+1
-5
1 addition, 5 deletions
...roid/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt
+6
-15
6 additions, 15 deletions
vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt
with
7 additions
and
20 deletions
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+
1
−
5
View file @
18e98f0d
...
...
@@ -106,9 +106,7 @@ class MRLPanelFragment : DialogFragment(), View.OnKeyListener, TextView.OnEditor
dismiss
()
}
override
fun
onEditorAction
(
v
:
TextView
,
actionId
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
false
}
override
fun
onEditorAction
(
v
:
TextView
,
actionId
:
Int
,
event
:
KeyEvent
)
=
false
override
fun
onClick
(
v
:
View
)
{
processUri
()
...
...
@@ -116,9 +114,7 @@ class MRLPanelFragment : DialogFragment(), View.OnKeyListener, TextView.OnEditor
override
fun
onDestroy
()
{
super
.
onDestroy
()
val
activity
=
activity
// TV
(
activity
as
?
DialogActivity
)
?.
finish
()
}
}
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt
+
6
−
15
View file @
18e98f0d
...
...
@@ -22,17 +22,13 @@ package org.videolan.vlc.viewmodels
import
android.arch.lifecycle.MutableLiveData
import
android.arch.lifecycle.ViewModel
import
android.databinding.BaseObservable
import
android.databinding.ObservableArrayList
import
android.databinding.ObservableField
import
android.text.Editable
import
android.text.TextWatcher
import
android.util.Log
import
kotlinx.coroutines.experimental.android.UI
import
kotlinx.coroutines.experimental.launch
import
kotlinx.coroutines.experimental.withContext
import
org.videolan.medialibrary.media.MediaWrapper
import
org.videolan.vlc.VLCApplication
import
org.videolan.vlc.util.VLCIO
import
org.videolan.vlc.util.uiJob
class
MRLPanelModel
:
ViewModel
()
{
...
...
@@ -44,13 +40,8 @@ class MRLPanelModel: ViewModel() {
val
observableHistory
=
MutableLiveData
<
Array
<
MediaWrapper
>>()
fun
updateHistory
()
{
launch
(
VLCIO
)
{
val
history
=
VLCApplication
.
getMLInstance
().
lastStreamsPlayed
()
launch
(
UI
)
{
observableHistory
.
value
=
history
}
}
}
fun
updateHistory
()
=
uiJob
{
val
history
=
withContext
(
VLCIO
)
{
VLCApplication
.
getMLInstance
().
lastStreamsPlayed
()
}
observableHistory
.
value
=
history
}
}
\ No newline at end of file
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