Remove old search option from menu
This commit is contained in:
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -50,6 +50,7 @@
|
||||
<entry key="app/src/main/res/layout/sheet_pages.xml" value="0.2601851851851852" />
|
||||
<entry key="app/src/main/res/menu/opt_browser.xml" value="0.24479166666666666" />
|
||||
<entry key="app/src/main/res/menu/opt_protect.xml" value="0.26927083333333335" />
|
||||
<entry key="app/src/main/res/menu/opt_remote.xml" value="0.25885416666666666" />
|
||||
<entry key="app/src/main/res/menu/opt_sources.xml" value="0.24479166666666666" />
|
||||
<entry key="app/src/main/res/menu/popup_category.xml" value="0.2601851851851852" />
|
||||
<entry key="app/src/main/res/xml/pref_main.xml" value="0.26927083333333335" />
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
package org.koitharu.kotatsu.remotelist.ui
|
||||
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
import org.koin.core.parameter.parametersOf
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.core.model.MangaFilter
|
||||
import org.koitharu.kotatsu.core.model.MangaSource
|
||||
import org.koitharu.kotatsu.list.ui.MangaListFragment
|
||||
import org.koitharu.kotatsu.search.ui.SearchActivity
|
||||
import org.koitharu.kotatsu.utils.ext.parcelableArgument
|
||||
import org.koitharu.kotatsu.utils.ext.withArgs
|
||||
|
||||
@@ -25,7 +20,7 @@ class RemoteListFragment : MangaListFragment() {
|
||||
viewModel.loadNextPage()
|
||||
}
|
||||
|
||||
override fun getTitle(): CharSequence? {
|
||||
override fun getTitle(): CharSequence {
|
||||
return source.title
|
||||
}
|
||||
|
||||
@@ -34,19 +29,6 @@ class RemoteListFragment : MangaListFragment() {
|
||||
super.onFilterChanged(filter)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.opt_remote, menu)
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
|
||||
R.id.action_search_internal -> {
|
||||
context?.startActivity(SearchActivity.newIntent(requireContext(), source, null))
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private const val ARG_SOURCE = "provider"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search_internal"
|
||||
android:orderInCategory="26"
|
||||
android:title="@string/search"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
Reference in New Issue
Block a user