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