Skip to content

Commit

Permalink
Revert binding view destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
sictiru committed Jul 11, 2024
1 parent 749f842 commit 398fd91
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {
private var savedScrollPosRel = 0f
private val webViewContentMutex = Any()

private var _binding: FragmentReadingitemBinding? = null
private var _readingItemActionsBinding: ReadingItemActionsBinding? = null
private val binding get() = _binding!!
private val readingItemActionsBinding get() = _readingItemActionsBinding!!
private lateinit var binding: FragmentReadingitemBinding
private lateinit var readingItemActionsBinding: ReadingItemActionsBinding


private lateinit var markStoryReadBehavior: MarkStoryReadBehavior
Expand Down Expand Up @@ -166,9 +164,6 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {

override fun onDestroyView() {
sampledQueue?.close()
binding.readingWebview.webChromeClient = null
_readingItemActionsBinding = null
_binding = null
super.onDestroyView()
}

Expand All @@ -186,8 +181,8 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
_binding = FragmentReadingitemBinding.inflate(inflater, container, false)
_readingItemActionsBinding = ReadingItemActionsBinding.bind(binding.root)
binding = FragmentReadingitemBinding.inflate(inflater, container, false)
readingItemActionsBinding = ReadingItemActionsBinding.bind(binding.root)

val readingActivity = requireActivity() as Reading
fs = readingActivity.fs
Expand Down

0 comments on commit 398fd91

Please sign in to comment.