diff --git a/app/src/main/java/com/starry/myne/epub/EpubParser.kt b/app/src/main/java/com/starry/myne/epub/EpubParser.kt index 31a99852..444c5f4e 100644 --- a/app/src/main/java/com/starry/myne/epub/EpubParser.kt +++ b/app/src/main/java/com/starry/myne/epub/EpubParser.kt @@ -47,9 +47,7 @@ data class EpubFile(val absPath: String, val data: ByteArray) { other as EpubFile if (absPath != other.absPath) return false - if (!data.contentEquals(other.data)) return false - - return true + return data.contentEquals(other.data) } override fun hashCode(): Int { @@ -95,7 +93,7 @@ private suspend fun parseAndCreateEpubBook(inputStream: FileInputStream): EpubBo ?: throw Exception(".opf file spine section missing") val metadataTitle = metadata.selectFirstChildTag("dc:title")?.textContent - ?: throw Exception(".opf metadata title tag missing") + ?: "Unknown Title" val metadataCoverId = metadata .selectChildTag("meta") diff --git a/app/src/main/java/com/starry/myne/repo/BookRepository.kt b/app/src/main/java/com/starry/myne/repo/BookRepository.kt index db1a673f..cd1be50c 100644 --- a/app/src/main/java/com/starry/myne/repo/BookRepository.kt +++ b/app/src/main/java/com/starry/myne/repo/BookRepository.kt @@ -111,7 +111,6 @@ class BookRepository { suspend fun getExtraInfo(bookName: String): ExtraInfo? = suspendCoroutine { continuation -> val encodedName = URLEncoder.encode(bookName, "UTF-8") val url = "${googleBooksUrl}?q=$encodedName&startIndex=0&maxResults=1&key=$googleApiKey" - println(url) val request = Request.Builder().get().url(url).build() okHttpClient.newCall(request).enqueue(object : Callback { override fun onFailure(call: Call, e: IOException) { diff --git a/app/src/main/java/com/starry/myne/ui/screens/reader/composables/ReaderDetailScreen.kt b/app/src/main/java/com/starry/myne/ui/screens/reader/composables/ReaderDetailScreen.kt index c5584412..434d8a0e 100644 --- a/app/src/main/java/com/starry/myne/ui/screens/reader/composables/ReaderDetailScreen.kt +++ b/app/src/main/java/com/starry/myne/ui/screens/reader/composables/ReaderDetailScreen.kt @@ -242,8 +242,6 @@ fun ReaderDetailScreen( fontSize = 24.sp, fontFamily = figeronaFont, fontWeight = FontWeight.Bold, - maxLines = 2, - overflow = TextOverflow.Ellipsis, color = MaterialTheme.colorScheme.onBackground, )