mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-11 00:23:58 -04:00
Removed deprecated method, unused code and fixed lint error
This commit is contained in:
parent
7d651ff382
commit
ae62813dce
@ -146,7 +146,6 @@ class OnlineLibraryFragment : BaseFragment(), FragmentActivityExtensions {
|
|||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View? {
|
): View? {
|
||||||
setHasOptionsMenu(true)
|
|
||||||
fragmentDestinationDownloadBinding =
|
fragmentDestinationDownloadBinding =
|
||||||
FragmentDestinationDownloadBinding.inflate(inflater, container, false)
|
FragmentDestinationDownloadBinding.inflate(inflater, container, false)
|
||||||
val toolbar = fragmentDestinationDownloadBinding?.root?.findViewById<Toolbar>(R.id.toolbar)
|
val toolbar = fragmentDestinationDownloadBinding?.root?.findViewById<Toolbar>(R.id.toolbar)
|
||||||
@ -266,16 +265,6 @@ class OnlineLibraryFragment : BaseFragment(), FragmentActivityExtensions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item.itemId) {
|
|
||||||
R.id.select_language -> {
|
|
||||||
requireActivity().navigate(R.id.languageFragment)
|
|
||||||
closeKeyboard()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return super.onOptionsItemSelected(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
availableSpaceCalculator.dispose()
|
availableSpaceCalculator.dispose()
|
||||||
|
@ -94,10 +94,6 @@ abstract class PageFragment : OnItemClickListener, BaseFragment(), FragmentActiv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupMenu() {
|
private fun setupMenu() {
|
||||||
(requireActivity() as MenuHost).addMenuProvider(
|
(requireActivity() as MenuHost).addMenuProvider(
|
||||||
object : MenuProvider {
|
object : MenuProvider {
|
||||||
@ -112,6 +108,7 @@ abstract class PageFragment : OnItemClickListener, BaseFragment(), FragmentActiv
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("ReturnCount")
|
||||||
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
||||||
when (menuItem.itemId) {
|
when (menuItem.itemId) {
|
||||||
android.R.id.home -> {
|
android.R.id.home -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user