@@ -9,17 +9,15 @@ import androidx.lifecycle.MutableLiveData
9
9
import androidx.recyclerview.widget.LinearLayoutManager
10
10
import com.github.code.gambit.R
11
11
import com.github.code.gambit.data.model.File
12
- import com.github.code.gambit.data.model.Url
13
12
import com.github.code.gambit.databinding.SearchLayoutBinding
14
13
import com.github.code.gambit.ui.fragment.home.FileListAdapter
15
- import com.github.code.gambit.ui.fragment.home.FileUrlClickCallback
16
14
import com.github.code.gambit.utility.extention.hide
17
15
import com.github.code.gambit.utility.extention.show
18
16
19
17
class FileSearchComponentImpl (
20
18
private val binding : SearchLayoutBinding ,
21
19
private val adapter : FileListAdapter
22
- ) : FileSearchComponent, FileUrlClickCallback {
20
+ ) : FileSearchComponent {
23
21
24
22
val fileSearchRequest = MutableLiveData <String >()
25
23
private var context: Context ? = null
@@ -30,7 +28,6 @@ class FileSearchComponentImpl(
30
28
binding.fileList.layoutManager = LinearLayoutManager (context)
31
29
binding.fileList.setHasFixedSize(false )
32
30
binding.fileList.adapter = adapter
33
- adapter.listener = this
34
31
binding.homeButton.setOnClickListener {
35
32
setIllustrationState(true )
36
33
closeFunc()
@@ -101,16 +98,4 @@ class FileSearchComponentImpl(
101
98
override fun getRequests (): MutableLiveData <String > {
102
99
return fileSearchRequest
103
100
}
104
-
105
- override fun onCreateNewUrl (file : File ) = fileSearchRequest.postValue(" " )
106
-
107
- override fun onLoadMoreUrl (file : File ) = fileSearchRequest.postValue(" " )
108
-
109
- override fun onUrlLongClick (url : Url , file : File ) = fileSearchRequest.postValue(" " )
110
-
111
- override fun onUrlClick (url : Url , file : File ) = fileSearchRequest.postValue(" " )
112
-
113
- override fun onItemClick (item : File ) = fileSearchRequest.postValue(" " )
114
-
115
- override fun onItemLongClick (item : File ) = fileSearchRequest.postValue(" " )
116
101
}
0 commit comments