Skip to content

Commit 0e8e405

Browse files
explicit listener removed from search component
1 parent e2e075d commit 0e8e405

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

apikey.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
API_KEY="replace this with your api key"
1+
API_KEY="replace this with your api key"

app/src/main/java/com/github/code/gambit/ui/fragment/home/searchcomponent/FileSearchComponentImpl.kt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ import androidx.lifecycle.MutableLiveData
99
import androidx.recyclerview.widget.LinearLayoutManager
1010
import com.github.code.gambit.R
1111
import com.github.code.gambit.data.model.File
12-
import com.github.code.gambit.data.model.Url
1312
import com.github.code.gambit.databinding.SearchLayoutBinding
1413
import com.github.code.gambit.ui.fragment.home.FileListAdapter
15-
import com.github.code.gambit.ui.fragment.home.FileUrlClickCallback
1614
import com.github.code.gambit.utility.extention.hide
1715
import com.github.code.gambit.utility.extention.show
1816

1917
class FileSearchComponentImpl(
2018
private val binding: SearchLayoutBinding,
2119
private val adapter: FileListAdapter
22-
) : FileSearchComponent, FileUrlClickCallback {
20+
) : FileSearchComponent {
2321

2422
val fileSearchRequest = MutableLiveData<String>()
2523
private var context: Context? = null
@@ -30,7 +28,6 @@ class FileSearchComponentImpl(
3028
binding.fileList.layoutManager = LinearLayoutManager(context)
3129
binding.fileList.setHasFixedSize(false)
3230
binding.fileList.adapter = adapter
33-
adapter.listener = this
3431
binding.homeButton.setOnClickListener {
3532
setIllustrationState(true)
3633
closeFunc()
@@ -101,16 +98,4 @@ class FileSearchComponentImpl(
10198
override fun getRequests(): MutableLiveData<String> {
10299
return fileSearchRequest
103100
}
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("")
116101
}

0 commit comments

Comments
 (0)