fix: Context issues in fragment sheet.
This commit is contained in:
parent
cd8b7aaf9d
commit
806e56e20b
@ -225,7 +225,7 @@ class ArticleFragment : Fragment(), DIAware {
|
||||
}
|
||||
this@ArticleFragment.item.unread = false
|
||||
Toast.makeText(
|
||||
context,
|
||||
requireContext(),
|
||||
R.string.marked_as_read,
|
||||
Toast.LENGTH_LONG,
|
||||
).show()
|
||||
|
@ -52,19 +52,17 @@ class FilterSheetFragment : BottomSheetDialogFragment(), DIAware {
|
||||
false,
|
||||
)
|
||||
|
||||
val context: Context? = context
|
||||
|
||||
if (context == null) {
|
||||
dismiss()
|
||||
Exception("FilterSheetFragment context is null").sendSilentlyWithAcraWithName("FilterSheetFragment > onCreateView")
|
||||
} else {
|
||||
try {
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
handleTagChips(context)
|
||||
handleSourceChips(context)
|
||||
handleTagChips(requireContext())
|
||||
handleSourceChips(requireContext())
|
||||
|
||||
binding.progressBar2.visibility = GONE
|
||||
binding.filterView.visibility = VISIBLE
|
||||
}
|
||||
} catch (e: IllegalStateException) {
|
||||
dismiss()
|
||||
e.sendSilentlyWithAcraWithName("FilterSheetFragment > onCreateView")
|
||||
}
|
||||
|
||||
binding.floatingActionButton2.setOnClickListener {
|
||||
|
Loading…
Reference in New Issue
Block a user