mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-17 11:25:34 -04:00
#2242 fixed one leak, much better performance
This commit is contained in:
parent
4bc8736304
commit
f8b8e6ed2d
@ -25,6 +25,7 @@ import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import kotlinx.android.synthetic.main.fragment_destination_library.go_to_downloads_button_no_files
|
||||
import org.kiwix.kiwixmobile.R
|
||||
@ -59,6 +60,11 @@ class LocalLibraryFragment : ZimFileSelectFragment() {
|
||||
baseActivity.kiwixActivityComponent.inject(this)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
(activity as AppCompatActivity).setSupportActionBar(null)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.menu_zim_manager, menu)
|
||||
val searchItem = menu.findItem(R.id.action_search)
|
||||
|
@ -57,6 +57,11 @@ class OnlineLibraryFragment : LibraryFragment(), BaseFragmentActivityExtensions
|
||||
zimManageViewModel.requestFiltering.onNext("")
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
(activity as AppCompatActivity).setSupportActionBar(null)
|
||||
}
|
||||
|
||||
override fun onBackPressed(activity: AppCompatActivity): BaseFragmentActivityExtensions.Super {
|
||||
getActivity()?.finish()
|
||||
return BaseFragmentActivityExtensions.Super.ShouldNotCall
|
||||
|
@ -238,6 +238,11 @@ class ReaderFragment : CoreReaderFragment() {
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
(activity as AppCompatActivity).setSupportActionBar(null)
|
||||
}
|
||||
|
||||
override fun openFullScreen() {
|
||||
super.openFullScreen()
|
||||
requireActivity().bottom_nav_view.visibility = GONE
|
||||
|
@ -84,6 +84,11 @@ open class ZimFileSelectFragment : BaseFragment() {
|
||||
baseActivity.kiwixActivityComponent.inject(this)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
actionMode = null
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
|
@ -72,7 +72,8 @@ public class TableDrawerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
||||
vh.title.setText(title);
|
||||
} else {
|
||||
String empty = context.getString(R.string.no_section_info);
|
||||
if (context instanceof WebViewProvider) {
|
||||
if (context instanceof WebViewProvider
|
||||
&& ((WebViewProvider) context).getCurrentWebView() != null) {
|
||||
empty = ((WebViewProvider) context).getCurrentWebView().getTitle();
|
||||
}
|
||||
vh.title.setText(empty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user