network #28
@ -275,10 +275,10 @@ class ArticleFragment : Fragment(), DIAware {
|
||||
}
|
||||
|
||||
private fun getContentFromMercury(customTabsIntent: CustomTabsIntent) {
|
||||
if (repository.isNetworkAvailable()) {
|
||||
AmineB marked this conversation as resolved
Outdated
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
val parser = MercuryApi()
|
||||
AmineB marked this conversation as resolved
Outdated
AmineB
commented
Same here. We are fetching data from an api, and we there is no need to do try anything if there is no network available. Same here. We are fetching data from an api, and we there is no need to do try anything if there is no network available.
davidoskky
commented
Right! Right!
By the way, what should this Mercury be?
I never saw this work and each time I got the article open in the browser instead.
AmineB
commented
This is mercury. It parses the page and fetch it´s content. I'll look into why it does not work. [This is mercury](https://mercury.postlight.com/web-parser/). It parses the page and fetch it´s content.
I'll look into why it does not work.
|
||||
|
||||
if (repository.isNetworkAvailable()) {
|
||||
parser.parseUrl(url).enqueue(
|
||||
object : Callback<ParsedContent> {
|
||||
override fun onResponse(
|
||||
|
Loading…
Reference in New Issue
Block a user
This should only be done if the network is available as it was before.