Commit a080085d authored by Max Lv's avatar Max Lv

Clean up

parent 091ae734
...@@ -55,7 +55,6 @@ import kotlinx.coroutines.Job ...@@ -55,7 +55,6 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import me.zhanghai.android.fastscroll.FastScrollerBuilder import me.zhanghai.android.fastscroll.FastScrollerBuilder
import me.zhanghai.android.materialprogressbar.MaterialProgressBar import me.zhanghai.android.materialprogressbar.MaterialProgressBar
import java.io.IOException
import java.net.HttpURLConnection import java.net.HttpURLConnection
import java.net.MalformedURLException import java.net.MalformedURLException
import java.net.URL import java.net.URL
...@@ -247,14 +246,9 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener ...@@ -247,14 +246,9 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener
for (url in subscription.urls.asIterable()) { for (url in subscription.urls.asIterable()) {
try { try {
val connection = url.openConnection() as HttpURLConnection val connection = url.openConnection() as HttpURLConnection
try {
ProfileManager.createProfilesFromJson(sequenceOf(connection.inputStream), replace = true) ProfileManager.createProfilesFromJson(sequenceOf(connection.inputStream), replace = true)
} catch (e: RuntimeException) {
e.printStackTrace() } catch (e: Exception) {
activity.snackbar(e.readableMessage).show()
}
} catch (e: IOException) {
e.printStackTrace() e.printStackTrace()
activity.snackbar(e.readableMessage).show() activity.snackbar(e.readableMessage).show()
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment