Skip to content

Commit bcf8565

Browse files
committed
Remove comments
1 parent 403e817 commit bcf8565

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/src/main/java/guide/graphql/toc/ui/chapters/ChaptersFragment.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class ChaptersFragment : Fragment() {
6868
binding.chapters.adapter = adapter
6969

7070
lifecycleScope.launchWhenStarted {
71-
// Loading
7271
try {
7372
val response = apolloClient.query(
7473
ChaptersQuery()
@@ -77,10 +76,8 @@ class ChaptersFragment : Fragment() {
7776
throw Exception("Response has errors")
7877
}
7978
val chapters = response.data?.chapters ?: throw Exception("Data is null")
80-
// Success
8179
adapter.updateChapters(chapters)
8280
} catch (e: ApolloException) {
83-
// Error
8481
showErrorMessage("GraphQL request failed")
8582
} catch (e: Exception) {
8683
showErrorMessage(e.message.orEmpty())

app/src/main/java/guide/graphql/toc/ui/sections/SectionsFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,19 @@ class SectionsFragment : Fragment() {
5858
binding.sections.adapter = adapter
5959

6060
lifecycleScope.launchWhenStarted {
61-
// Loading
6261
binding.spinner.visibility = View.VISIBLE
6362
binding.error.visibility = View.GONE
6463
try {
6564
val response = apolloClient.query(
6665
SectionsQuery(id = args.chapterId)
6766
).toDeferred().await()
67+
6868
if (response.hasErrors()) {
6969
throw Exception("Response has errors")
7070
}
71+
7172
val sections = response.data?.chapter?.sections ?: throw Exception("Data is null")
72-
// Success
73+
7374
if (sections.size > 1) {
7475
adapter.updateSections(sections)
7576
binding.spinner.visibility = View.GONE
@@ -78,7 +79,6 @@ class SectionsFragment : Fragment() {
7879
throw Exception("No sections")
7980
}
8081
} catch (e: ApolloException) {
81-
// Error
8282
showErrorMessage("GraphQL request failed")
8383
} catch (e: Exception) {
8484
showErrorMessage(e.message.orEmpty())

0 commit comments

Comments
 (0)