diff --git a/app/src/main/assets/viewer.html b/app/src/main/assets/viewer.html index bd46d51..80a1eb3 100644 --- a/app/src/main/assets/viewer.html +++ b/app/src/main/assets/viewer.html @@ -33,9 +33,9 @@ } function setAuthor(author, url) { - if (author && url && author != "" && url != "") $('#viewerAuthor').html('' + author + '
'); - else if (author && author != "") $('#viewerAuthor').html(author + '
'); - if (url && url != "") $('#viewerAuthor').html('Author
'); + if (author && url && author.length > 0 && url.length > 0) $('#viewerAuthor').html('By ' + author + '
'); + else if (author && author.length > 0) $('#viewerAuthor').html('By ' + author + '
'); + else if (url && url.length > 0) $('#viewerAuthor').html('By Author
'); else $('#viewerAuthor').html(''); } diff --git a/app/src/main/java/telegra/ph/TelegraphApi.kt b/app/src/main/java/telegra/ph/TelegraphApi.kt index f3a344e..796790e 100644 --- a/app/src/main/java/telegra/ph/TelegraphApi.kt +++ b/app/src/main/java/telegra/ph/TelegraphApi.kt @@ -115,7 +115,7 @@ object TelegraphApi { val url: String = json.optString("url") val title: String = json.optString("title") val description: String = json.optString("description") - val authorName: String? = json.optString("authorName") + val authorName: String? = json.optString("author_name") val authorUrl: String? = json.optString("author_url") val imageUrl: String? = json.optString("image_url") val content: String? = json.optJSONArray("content")?.parseContent()