[Android] Cleaning

Geoffrey Métais git at videolan.org
Wed Apr 4 18:34:46 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 26 17:41:59 2018 +0100| [8a4f6964519df3838709d500d2e8258f1df14b9c] | committer: Geoffrey Métais

Cleaning

> https://code.videolan.org/videolan/vlc-android/commit/8a4f6964519df3838709d500d2e8258f1df14b9c
---

 vlc-android/src/org/videolan/vlc/viewmodels/BaseModel.kt | 16 ++++------------
 .../src/org/videolan/vlc/viewmodels/MedialibraryModel.kt |  1 -
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/BaseModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/BaseModel.kt
index 4fe407116..7628ae646 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/BaseModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/BaseModel.kt
@@ -56,21 +56,13 @@ abstract class BaseModel<T : MediaLibraryItem> : ViewModel() {
         }
     }
 
-    fun refresh() {
-        updateActor.offer(Refresh)
-    }
+    fun refresh() = updateActor.offer(Refresh)
 
-    fun sort(sort: Int) {
-        updateActor.offer(Sort(sort))
-    }
+    fun sort(sort: Int) = updateActor.offer(Sort(sort))
 
-    fun remove(mw: T) {
-        updateActor.offer(Remove(mw))
-    }
+    fun remove(mw: T) = updateActor.offer(Remove(mw))
 
-    fun filter(query: String?) {
-        updateActor.offer(Filter(query))
-    }
+    fun filter(query: String?) = updateActor.offer(Filter(query))
 
     protected open fun removeMedia(media: T) {
         dataset.value?.let {
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
index f4b4785e4..5b2eb217c 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
@@ -31,7 +31,6 @@ import org.videolan.medialibrary.media.MediaWrapper
 
 abstract class MedialibraryModel<T : MediaLibraryItem> : BaseModel<T>(), Medialibrary.OnMedialibraryReadyListener, MediaUpdatedCb, MediaAddedCb {
 
-//    val refreshing = MutableLiveData<Boolean>()
     val medialibrary = Medialibrary.getInstance()!!
 
     override fun fetch() {



More information about the Android mailing list