🚀 Flexible text parsing and storing system
Pros: * Removed text update (now it is always updated and parsed from the file each time) * Removed text storage (smaller app size) * Dramatically sped up loading in Browse (10 books in ~1s) Cons: * Longer Reader loading time (~3x, partly fixable) * More dependency on the file (fixable) Resolves: #134
This commit is contained in:
parent
aa657790d0
commit
3853727ae7
70 changed files with 294 additions and 1609 deletions
|
|
@ -0,0 +1,190 @@
|
|||
{
|
||||
"formatVersion": 1,
|
||||
"database": {
|
||||
"version": 8,
|
||||
"identityHash": "095e8b560edd2bf64b64720308b686c4",
|
||||
"entities": [
|
||||
{
|
||||
"tableName": "BookEntity",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT NOT NULL, `author` TEXT, `description` TEXT, `filePath` TEXT NOT NULL, `scrollIndex` INTEGER NOT NULL, `scrollOffset` INTEGER NOT NULL, `progress` REAL NOT NULL, `image` TEXT, `category` TEXT NOT NULL)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "title",
|
||||
"columnName": "title",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "author",
|
||||
"columnName": "author",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "description",
|
||||
"columnName": "description",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "filePath",
|
||||
"columnName": "filePath",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "scrollIndex",
|
||||
"columnName": "scrollIndex",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "scrollOffset",
|
||||
"columnName": "scrollOffset",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "progress",
|
||||
"columnName": "progress",
|
||||
"affinity": "REAL",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "image",
|
||||
"columnName": "image",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "category",
|
||||
"columnName": "category",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": true,
|
||||
"columnNames": [
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "HistoryEntity",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `bookId` INTEGER NOT NULL, `time` INTEGER NOT NULL)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "bookId",
|
||||
"columnName": "bookId",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "time",
|
||||
"columnName": "time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": true,
|
||||
"columnNames": [
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "ColorPresetEntity",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `backgroundColor` INTEGER NOT NULL, `fontColor` INTEGER NOT NULL, `isSelected` INTEGER NOT NULL, `order` INTEGER NOT NULL)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "name",
|
||||
"columnName": "name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "backgroundColor",
|
||||
"columnName": "backgroundColor",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "fontColor",
|
||||
"columnName": "fontColor",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "isSelected",
|
||||
"columnName": "isSelected",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "order",
|
||||
"columnName": "order",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": true,
|
||||
"columnNames": [
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "FavoriteDirectoryEntity",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`path` TEXT NOT NULL, PRIMARY KEY(`path`))",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "path",
|
||||
"columnName": "path",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": false,
|
||||
"columnNames": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
}
|
||||
],
|
||||
"views": [],
|
||||
"setupQueries": [
|
||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '095e8b560edd2bf64b64720308b686c4')"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package ua.acclorite.book_story.data.local.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import com.google.common.reflect.TypeToken
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonSyntaxException
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
|
||||
class ChapterConverter {
|
||||
@TypeConverter
|
||||
fun fromChapterList(chapters: List<Chapter>): String {
|
||||
return Gson().toJson(chapters)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toChapterList(data: String): List<Chapter> {
|
||||
val listType = object : TypeToken<List<Chapter>>() {}.type
|
||||
return try {
|
||||
Gson().fromJson<List<Chapter>?>(data, listType).sortedBy { it.index }
|
||||
} catch (j: JsonSyntaxException) {
|
||||
j.printStackTrace()
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +1,15 @@
|
|||
package ua.acclorite.book_story.data.local.dto
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.TypeConverters
|
||||
import ua.acclorite.book_story.data.local.converter.ChapterConverter
|
||||
import ua.acclorite.book_story.domain.library.category.Category
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
|
||||
@Entity
|
||||
@TypeConverters(ChapterConverter::class)
|
||||
data class BookEntity(
|
||||
@PrimaryKey(true) val id: Int = 0,
|
||||
val title: String,
|
||||
val author: String?,
|
||||
val description: String?,
|
||||
val textPath: String,
|
||||
@ColumnInfo(defaultValue = "[]")
|
||||
val chapters: List<Chapter>,
|
||||
val filePath: String,
|
||||
val scrollIndex: Int,
|
||||
val scrollOffset: Int,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ interface BookDao {
|
|||
|
||||
/* ------ BookEntity ------------------------ */
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertBooks(
|
||||
books: List<BookEntity>
|
||||
suspend fun insertBook(
|
||||
book: BookEntity
|
||||
)
|
||||
|
||||
@Query(
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import ua.acclorite.book_story.data.local.dto.HistoryEntity
|
|||
ColorPresetEntity::class,
|
||||
FavoriteDirectoryEntity::class,
|
||||
],
|
||||
version = 7,
|
||||
version = 8,
|
||||
autoMigrations = [
|
||||
AutoMigration(1, 2),
|
||||
AutoMigration(2, 3),
|
||||
|
|
@ -28,6 +28,7 @@ import ua.acclorite.book_story.data.local.dto.HistoryEntity
|
|||
AutoMigration(4, 5),
|
||||
AutoMigration(5, 6),
|
||||
AutoMigration(6, 7),
|
||||
AutoMigration(7, 8, spec = DatabaseHelper.MIGRATION_7_8::class)
|
||||
],
|
||||
exportSchema = true
|
||||
)
|
||||
|
|
@ -83,4 +84,8 @@ object DatabaseHelper {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
@DeleteColumn("BookEntity", "textPath")
|
||||
@DeleteColumn("BookEntity", "chapters")
|
||||
class MIGRATION_7_8 : AutoMigrationSpec
|
||||
}
|
||||
|
|
@ -17,11 +17,9 @@ class BookMapperImpl @Inject constructor() : BookMapper {
|
|||
scrollOffset = book.scrollOffset,
|
||||
progress = book.progress,
|
||||
author = book.author.getAsString(),
|
||||
textPath = book.textPath,
|
||||
description = book.description,
|
||||
image = book.coverImage?.toString(),
|
||||
category = book.category,
|
||||
chapters = book.chapters
|
||||
category = book.category
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -36,12 +34,10 @@ class BookMapperImpl @Inject constructor() : BookMapper {
|
|||
scrollIndex = bookEntity.scrollIndex,
|
||||
scrollOffset = bookEntity.scrollOffset,
|
||||
progress = bookEntity.progress,
|
||||
textPath = bookEntity.textPath,
|
||||
filePath = bookEntity.filePath,
|
||||
lastOpened = null,
|
||||
category = bookEntity.category,
|
||||
coverImage = if (bookEntity.image != null) Uri.parse(bookEntity.image) else null,
|
||||
chapters = bookEntity.chapters
|
||||
coverImage = if (bookEntity.image != null) Uri.parse(bookEntity.image) else null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -76,7 +76,6 @@ class EpubFileParser @Inject constructor() : FileParser {
|
|||
title = title,
|
||||
author = author,
|
||||
description = description,
|
||||
textPath = "",
|
||||
scrollIndex = 0,
|
||||
scrollOffset = 0,
|
||||
progress = 0f,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ class Fb2FileParser @Inject constructor() : FileParser {
|
|||
title = title,
|
||||
author = author,
|
||||
description = descriptionFromFile,
|
||||
textPath = "",
|
||||
scrollIndex = 0,
|
||||
scrollOffset = 0,
|
||||
progress = 0f,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class HtmlFileParser @Inject constructor() : FileParser {
|
|||
title = title,
|
||||
author = UIText.StringResource(R.string.unknown_author),
|
||||
description = null,
|
||||
textPath = "",
|
||||
scrollIndex = 0,
|
||||
scrollOffset = 0,
|
||||
progress = 0f,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class PdfFileParser @Inject constructor(
|
|||
title = title,
|
||||
author = author,
|
||||
description = description,
|
||||
textPath = "",
|
||||
scrollIndex = 0,
|
||||
scrollOffset = 0,
|
||||
progress = 0f,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class TxtFileParser @Inject constructor() : FileParser {
|
|||
title = title,
|
||||
author = author,
|
||||
description = null,
|
||||
textPath = "",
|
||||
scrollIndex = 0,
|
||||
scrollOffset = 0,
|
||||
progress = 0f,
|
||||
|
|
|
|||
|
|
@ -9,26 +9,20 @@ import android.util.Log
|
|||
import androidx.compose.ui.text.AnnotatedString
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.yield
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.data.local.room.BookDao
|
||||
import ua.acclorite.book_story.data.mapper.book.BookMapper
|
||||
import ua.acclorite.book_story.data.parser.FileParser
|
||||
import ua.acclorite.book_story.data.parser.MarkdownParser
|
||||
import ua.acclorite.book_story.data.parser.TextParser
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithText
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithTextAndCover
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithCover
|
||||
import ua.acclorite.book_story.domain.reader.ChaptersAndText
|
||||
import ua.acclorite.book_story.domain.repository.BookRepository
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.util.CoverImage
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
import java.io.BufferedReader
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.FileReader
|
||||
import java.util.UUID
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
|
@ -41,7 +35,6 @@ private const val UPDATE_BOOK = "UPDATE BOOK, REPO"
|
|||
private const val DELETE_BOOKS = "DELETE BOOKS, REPO"
|
||||
private const val CAN_RESET_COVER = "CAN RESET COVER, REPO"
|
||||
private const val RESET_COVER = "RESET COVER, REPO"
|
||||
private const val CHECK_FOR_TEXT_UPDATE = "CHECK TEXT UPD, REPO"
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Singleton
|
||||
|
|
@ -97,21 +90,30 @@ class BookRepositoryImpl @Inject constructor(
|
|||
}
|
||||
|
||||
/**
|
||||
* Loads text from given path. Should be .txt.
|
||||
* Used to get text from book and load Reader.
|
||||
* Loads text from the book.
|
||||
*/
|
||||
override suspend fun getBookText(textPath: String): List<AnnotatedString> {
|
||||
val textFile = File(textPath)
|
||||
val markdownLines = mutableListOf<AnnotatedString>()
|
||||
override suspend fun getBookText(bookId: Int): ChaptersAndText {
|
||||
if (bookId == -1) return ChaptersAndText(chapters = emptyList(), text = emptyList())
|
||||
|
||||
if (textPath.isBlank() || !textFile.exists() || textFile.extension != "txt") {
|
||||
Log.w(GET_TEXT, "Failed to load file: $textPath")
|
||||
return emptyList()
|
||||
val book = database.findBookById(bookId)
|
||||
val file = File(book.filePath)
|
||||
|
||||
if (!file.exists()) {
|
||||
Log.e(GET_TEXT, "File [$bookId] does not exist")
|
||||
return ChaptersAndText(chapters = emptyList(), text = emptyList())
|
||||
}
|
||||
|
||||
try {
|
||||
val parsedText = textParser.parse(file)
|
||||
if (parsedText is Resource.Error) {
|
||||
Log.e(GET_TEXT, "Failed to load text: $bookId")
|
||||
return ChaptersAndText(chapters = emptyList(), text = emptyList())
|
||||
}
|
||||
|
||||
val chapters = parsedText.data!!.map { it.chapter }
|
||||
val markdownLines = mutableListOf<AnnotatedString>()
|
||||
|
||||
withContext(Dispatchers.IO) {
|
||||
BufferedReader(FileReader(textFile)).forEachLine { line ->
|
||||
for (line in parsedText.data.map { it.text }.flatten()) {
|
||||
if (line.isNotBlank()) {
|
||||
markdownLines.add(
|
||||
markdownParser.parse(line.trim())
|
||||
|
|
@ -119,144 +121,34 @@ class BookRepositoryImpl @Inject constructor(
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Log.e(GET_TEXT, "Could not get text with markdown.")
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
Log.i(GET_TEXT, "Successfully loaded text with markdown.")
|
||||
return markdownLines
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the text of the book([bookId]) is up-to-date and did not change.
|
||||
*
|
||||
* @return If [Resource.Success] and returns null, then the book is up-to-date.
|
||||
*/
|
||||
override suspend fun checkForTextUpdate(bookId: Int): Resource<Pair<List<String>, List<Chapter>>?> {
|
||||
yield()
|
||||
|
||||
try {
|
||||
val book = database.findBookById(bookId)
|
||||
Log.i(CHECK_FOR_TEXT_UPDATE, "Checking [${book.title}] for text update.")
|
||||
|
||||
yield()
|
||||
|
||||
val text = withContext(Dispatchers.IO) {
|
||||
val lines = mutableListOf<String>()
|
||||
BufferedReader(FileReader(book.textPath)).forEachLine { line ->
|
||||
if (line.isNotBlank()) {
|
||||
lines.add(line.trim())
|
||||
}
|
||||
}
|
||||
lines.toList()
|
||||
}
|
||||
val chapters = book.chapters
|
||||
Log.i(CHECK_FOR_TEXT_UPDATE, "Got current text and chapters.")
|
||||
|
||||
yield()
|
||||
|
||||
val bookFile = File(book.filePath).apply {
|
||||
if (!exists()) {
|
||||
Log.e(CHECK_FOR_TEXT_UPDATE, "Couldn't get book's file: does not exist.")
|
||||
return Resource.Error(
|
||||
message = UIText.StringResource(
|
||||
R.string.file_not_found,
|
||||
name.takeLast(50)
|
||||
Log.i(GET_TEXT, "Successfully loaded text of [$bookId] with markdown.")
|
||||
return ChaptersAndText(
|
||||
chapters = chapters,
|
||||
text = markdownLines
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
yield()
|
||||
|
||||
val (updatedText, updatedChapters) = textParser.parse(bookFile).run {
|
||||
if (this is Resource.Error) {
|
||||
Log.e(CHECK_FOR_TEXT_UPDATE, "Couldn't get updated book's text.")
|
||||
return Resource.Error(
|
||||
message = UIText.StringResource(
|
||||
R.string.error_file_empty
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
data!!.map { it.text }.flatten() to data.map { it.chapter }
|
||||
}
|
||||
Log.i(CHECK_FOR_TEXT_UPDATE, "Successfully got new text and chapters.")
|
||||
|
||||
yield()
|
||||
|
||||
return Resource.Success(
|
||||
if (updatedText == text && updatedChapters == chapters) {
|
||||
Log.i(CHECK_FOR_TEXT_UPDATE, "Text is up-to-date(${book.title}).")
|
||||
null
|
||||
} else {
|
||||
Log.i(CHECK_FOR_TEXT_UPDATE, "Found difference in ${book.title}.")
|
||||
updatedText to updatedChapters
|
||||
}
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Log.e(CHECK_FOR_TEXT_UPDATE, "Check failed with the error: ${e.message}")
|
||||
return Resource.Error(
|
||||
UIText.StringResource(
|
||||
R.string.error_query,
|
||||
e.message ?: ""
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts book in database.
|
||||
* Creates covers and books folders, which contain book's text and cover.
|
||||
* Creates covers folder, which contains cover.
|
||||
*/
|
||||
override suspend fun insertBook(
|
||||
bookWithTextAndCover: BookWithTextAndCover
|
||||
bookWithCover: BookWithCover
|
||||
): Boolean {
|
||||
Log.i(INSERT_BOOK, "Inserting ${bookWithTextAndCover.book.title}.")
|
||||
Log.i(INSERT_BOOK, "Inserting ${bookWithCover.book.title}.")
|
||||
|
||||
val filesDir = application.filesDir
|
||||
val coversDir = File(filesDir, "covers")
|
||||
val booksDir = File(filesDir, "books")
|
||||
|
||||
if (!coversDir.exists()) {
|
||||
Log.i(INSERT_BOOK, "Created covers folder.")
|
||||
coversDir.mkdirs()
|
||||
}
|
||||
if (!booksDir.exists()) {
|
||||
Log.i(INSERT_BOOK, "Created books folder.")
|
||||
booksDir.mkdirs()
|
||||
}
|
||||
|
||||
var coverUri = ""
|
||||
val textUri: String
|
||||
|
||||
if (bookWithTextAndCover.text.isEmpty()) {
|
||||
Log.e(INSERT_BOOK, "Text is empty.")
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
textUri = "${UUID.randomUUID()}.txt"
|
||||
val textPath = File(booksDir, textUri)
|
||||
|
||||
withContext(Dispatchers.IO) {
|
||||
FileOutputStream(textPath).use { stream ->
|
||||
bookWithTextAndCover.text.forEach { line ->
|
||||
stream.write(line.toByteArray())
|
||||
stream.write(System.lineSeparator().toByteArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(INSERT_BOOK, "Could not write text.")
|
||||
e.printStackTrace()
|
||||
return false
|
||||
}
|
||||
|
||||
if (bookWithTextAndCover.coverImage != null) {
|
||||
if (bookWithCover.coverImage != null) {
|
||||
try {
|
||||
coverUri = "${UUID.randomUUID()}.webp"
|
||||
val cover = File(coversDir, coverUri)
|
||||
|
|
@ -264,7 +156,7 @@ class BookRepositoryImpl @Inject constructor(
|
|||
withContext(Dispatchers.IO) {
|
||||
FileOutputStream(cover).use { stream ->
|
||||
if (
|
||||
!bookWithTextAndCover.coverImage.copy(Bitmap.Config.RGB_565, false)
|
||||
!bookWithCover.coverImage.copy(Bitmap.Config.RGB_565, false)
|
||||
.compress(
|
||||
Bitmap.CompressFormat.WEBP,
|
||||
20,
|
||||
|
|
@ -282,30 +174,27 @@ class BookRepositoryImpl @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
val updatedBook = bookWithTextAndCover.book.copy(
|
||||
textPath = "$booksDir/$textUri",
|
||||
val updatedBook = bookWithCover.book.copy(
|
||||
coverImage = if (coverUri.isNotBlank()) {
|
||||
Uri.fromFile(File("$coversDir/$coverUri"))
|
||||
} else null
|
||||
)
|
||||
|
||||
val bookToInsert = bookMapper.toBookEntity(updatedBook)
|
||||
database.insertBooks(listOf(bookToInsert))
|
||||
database.insertBook(bookToInsert)
|
||||
Log.i(INSERT_BOOK, "Successfully inserted book.")
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Update book without text or cover image.
|
||||
* Update book without cover image.
|
||||
*/
|
||||
override suspend fun updateBook(book: Book) {
|
||||
// without text and cover image
|
||||
val entity = database.findBookById(book.id)
|
||||
database.updateBooks(
|
||||
listOf(
|
||||
bookMapper.toBookEntity(
|
||||
book.copy(
|
||||
textPath = entity.textPath,
|
||||
coverImage = if (entity.image != null) Uri.parse(entity.image) else null
|
||||
)
|
||||
)
|
||||
|
|
@ -313,76 +202,6 @@ class BookRepositoryImpl @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update book with text. Deletes old text file and replaces it with new.
|
||||
*/
|
||||
override suspend fun updateBookWithText(bookWithText: BookWithText): Boolean {
|
||||
Log.i(UPDATE_BOOK, "Updating book with text: ${bookWithText.book.title}.")
|
||||
|
||||
// without cover image
|
||||
val filesDir = application.filesDir
|
||||
val booksDir = File(filesDir, "books")
|
||||
|
||||
if (!booksDir.exists()) {
|
||||
Log.i(UPDATE_BOOK, "Created books folder.")
|
||||
booksDir.mkdirs()
|
||||
}
|
||||
|
||||
val textUri: String
|
||||
val bookEntity = database.findBookById(bookWithText.book.id)
|
||||
|
||||
if (bookWithText.text.isEmpty()) {
|
||||
Log.e(UPDATE_BOOK, "Text is empty.")
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
textUri = "${UUID.randomUUID()}.txt"
|
||||
val textPath = File(booksDir, textUri)
|
||||
|
||||
withContext(Dispatchers.IO) {
|
||||
FileOutputStream(textPath).use { stream ->
|
||||
bookWithText.text.forEach { line ->
|
||||
stream.write(line.toByteArray())
|
||||
stream.write(System.lineSeparator().toByteArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(UPDATE_BOOK, "Could not update text.")
|
||||
e.printStackTrace()
|
||||
return false
|
||||
}
|
||||
|
||||
if (bookWithText.book.textPath.isNotBlank()) {
|
||||
try {
|
||||
val fileToDelete = File(
|
||||
bookWithText.book.textPath
|
||||
)
|
||||
|
||||
if (fileToDelete.exists()) {
|
||||
fileToDelete.delete()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(UPDATE_BOOK, "Failed to delete old text.")
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
val updatedBook = bookMapper.toBookEntity(
|
||||
bookWithText.book.copy(
|
||||
textPath = "$booksDir/$textUri",
|
||||
coverImage = if (bookEntity.image != null) Uri.parse(bookEntity.image) else null
|
||||
)
|
||||
)
|
||||
|
||||
database.updateBooks(
|
||||
listOf(updatedBook)
|
||||
)
|
||||
Log.i(UPDATE_BOOK, "Successfully updated book.")
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Update cover image of the book. Deletes old cover and replaces with new.
|
||||
*/
|
||||
|
|
@ -392,7 +211,6 @@ class BookRepositoryImpl @Inject constructor(
|
|||
) {
|
||||
Log.i(UPDATE_BOOK, "Updating cover image: ${bookWithOldCover.title}.")
|
||||
|
||||
// without text
|
||||
val book = database.findBookById(bookWithOldCover.id)
|
||||
var uri: String? = null
|
||||
|
||||
|
|
@ -451,7 +269,6 @@ class BookRepositoryImpl @Inject constructor(
|
|||
}
|
||||
|
||||
val bookWithNewCover = bookWithOldCover.copy(
|
||||
textPath = book.textPath,
|
||||
coverImage = newCoverImageUri
|
||||
)
|
||||
|
||||
|
|
@ -474,16 +291,11 @@ class BookRepositoryImpl @Inject constructor(
|
|||
|
||||
val filesDir = application.filesDir
|
||||
val coversDir = File(filesDir, "covers")
|
||||
val booksDir = File(filesDir, "books")
|
||||
|
||||
if (!coversDir.exists()) {
|
||||
Log.i(DELETE_BOOKS, "Created covers folder.")
|
||||
coversDir.mkdirs()
|
||||
}
|
||||
if (!booksDir.exists()) {
|
||||
Log.i(DELETE_BOOKS, "Created books folder.")
|
||||
booksDir.mkdirs()
|
||||
}
|
||||
|
||||
database.deleteBooks(
|
||||
books.map {
|
||||
|
|
@ -504,19 +316,6 @@ class BookRepositoryImpl @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
if (book.textPath.isNotBlank()) {
|
||||
try {
|
||||
val fileToDelete = File(book.textPath)
|
||||
|
||||
if (fileToDelete.exists()) {
|
||||
fileToDelete.delete()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(DELETE_BOOKS, "Could not delete text.")
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
book
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,15 +6,12 @@ import ua.acclorite.book_story.R
|
|||
import ua.acclorite.book_story.data.local.room.BookDao
|
||||
import ua.acclorite.book_story.data.mapper.book.BookMapper
|
||||
import ua.acclorite.book_story.data.parser.FileParser
|
||||
import ua.acclorite.book_story.data.parser.TextParser
|
||||
import ua.acclorite.book_story.domain.browse.SelectableFile
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithTextAndCover
|
||||
import ua.acclorite.book_story.domain.library.book.NullableBook
|
||||
import ua.acclorite.book_story.domain.library.book.NullableBook.NotNull
|
||||
import ua.acclorite.book_story.domain.library.book.NullableBook.Null
|
||||
import ua.acclorite.book_story.domain.repository.FileSystemRepository
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
import ua.acclorite.book_story.presentation.core.constants.Constants
|
||||
import ua.acclorite.book_story.presentation.core.constants.provideSupportedExtensions
|
||||
import java.io.File
|
||||
|
|
@ -31,11 +28,8 @@ private const val GET_FILES_FROM_DEVICE = "FILES FROM DEVICE, REPO"
|
|||
@Singleton
|
||||
class FileSystemRepositoryImpl @Inject constructor(
|
||||
private val database: BookDao,
|
||||
|
||||
private val bookMapper: BookMapper,
|
||||
|
||||
private val fileParser: FileParser,
|
||||
private val textParser: TextParser,
|
||||
private val fileParser: FileParser
|
||||
) : FileSystemRepository {
|
||||
|
||||
/**
|
||||
|
|
@ -155,26 +149,7 @@ class FileSystemRepositoryImpl @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
val parsedText = textParser.parse(file)
|
||||
if (parsedText is Resource.Error) {
|
||||
Log.e(GET_BOOK_FROM_FILE, "Parsed text(${file.name}) has error.")
|
||||
return Null(
|
||||
file.name,
|
||||
parsedText.message
|
||||
)
|
||||
}
|
||||
|
||||
Log.i(GET_BOOK_FROM_FILE, "Successfully got book from file.")
|
||||
return NotNull(
|
||||
bookWithTextAndCover = BookWithTextAndCover(
|
||||
book = parsedBook.book.copy(
|
||||
chapters = parsedText.data!!.map { it.chapter }
|
||||
),
|
||||
coverImage = parsedBook.coverImage,
|
||||
text = parsedText.data.map {
|
||||
it.text
|
||||
}.flatten()
|
||||
)
|
||||
)
|
||||
return NotNull(bookWithCover = parsedBook)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ import android.os.Parcelable
|
|||
import androidx.compose.runtime.Immutable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import ua.acclorite.book_story.domain.library.category.Category
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
|
||||
@Parcelize
|
||||
|
|
@ -17,15 +16,13 @@ data class Book(
|
|||
val author: UIText,
|
||||
val description: String?,
|
||||
|
||||
val textPath: String,
|
||||
val filePath: String,
|
||||
val coverImage: Uri?,
|
||||
|
||||
val scrollIndex: Int,
|
||||
val scrollOffset: Int,
|
||||
val progress: Float,
|
||||
val chapters: List<Chapter> = emptyList(),
|
||||
|
||||
val lastOpened: Long?,
|
||||
val category: Category,
|
||||
val category: Category
|
||||
) : Parcelable
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
package ua.acclorite.book_story.domain.library.book
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
|
||||
@Immutable
|
||||
data class BookWithText(
|
||||
val book: Book,
|
||||
val text: List<String>
|
||||
)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package ua.acclorite.book_story.domain.library.book
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import ua.acclorite.book_story.domain.util.CoverImage
|
||||
|
||||
@Immutable
|
||||
data class BookWithTextAndCover(
|
||||
val book: Book,
|
||||
val coverImage: CoverImage?,
|
||||
val text: List<String>
|
||||
)
|
||||
|
|
@ -5,14 +5,14 @@ import ua.acclorite.book_story.domain.ui.UIText
|
|||
|
||||
@Immutable
|
||||
sealed class NullableBook(
|
||||
val bookWithTextAndCover: BookWithTextAndCover?,
|
||||
val bookWithCover: BookWithCover?,
|
||||
val fileName: String?,
|
||||
val message: UIText?
|
||||
) {
|
||||
class NotNull(
|
||||
bookWithTextAndCover: BookWithTextAndCover
|
||||
bookWithCover: BookWithCover
|
||||
) : NullableBook(
|
||||
bookWithTextAndCover = bookWithTextAndCover,
|
||||
bookWithCover = bookWithCover,
|
||||
fileName = null,
|
||||
message = null
|
||||
)
|
||||
|
|
@ -21,7 +21,7 @@ sealed class NullableBook(
|
|||
fileName: String,
|
||||
message: UIText?
|
||||
) : NullableBook(
|
||||
bookWithTextAndCover = null,
|
||||
bookWithCover = null,
|
||||
fileName = fileName,
|
||||
message = message
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
package ua.acclorite.book_story.domain.reader
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
|
||||
@Immutable
|
||||
data class ChaptersAndText(
|
||||
val chapters: List<Chapter>,
|
||||
val text: List<AnnotatedString>
|
||||
)
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
package ua.acclorite.book_story.domain.repository
|
||||
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithText
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithTextAndCover
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithCover
|
||||
import ua.acclorite.book_story.domain.reader.ChaptersAndText
|
||||
import ua.acclorite.book_story.domain.util.CoverImage
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
|
||||
interface BookRepository {
|
||||
|
||||
|
|
@ -19,23 +16,17 @@ interface BookRepository {
|
|||
): List<Book>
|
||||
|
||||
suspend fun getBookText(
|
||||
textPath: String
|
||||
): List<AnnotatedString>
|
||||
|
||||
suspend fun checkForTextUpdate(bookId: Int): Resource<Pair<List<String>, List<Chapter>>?>
|
||||
bookId: Int
|
||||
): ChaptersAndText
|
||||
|
||||
suspend fun insertBook(
|
||||
bookWithTextAndCover: BookWithTextAndCover
|
||||
bookWithCover: BookWithCover
|
||||
): Boolean
|
||||
|
||||
suspend fun updateBook(
|
||||
book: Book
|
||||
)
|
||||
|
||||
suspend fun updateBookWithText(
|
||||
bookWithText: BookWithText
|
||||
): Boolean
|
||||
|
||||
suspend fun updateCoverImageOfBook(
|
||||
bookWithOldCover: Book,
|
||||
newCoverImage: CoverImage?
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
package ua.acclorite.book_story.domain.use_case.book
|
||||
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.repository.BookRepository
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
import javax.inject.Inject
|
||||
|
||||
class CheckForTextUpdate @Inject constructor(
|
||||
private val repository: BookRepository
|
||||
) {
|
||||
|
||||
suspend fun execute(bookId: Int): Resource<Pair<List<String>, List<Chapter>>?> {
|
||||
return repository.checkForTextUpdate(bookId)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ua.acclorite.book_story.domain.use_case.book
|
||||
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import ua.acclorite.book_story.domain.reader.ChaptersAndText
|
||||
import ua.acclorite.book_story.domain.repository.BookRepository
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ class GetText @Inject constructor(
|
|||
private val repository: BookRepository
|
||||
) {
|
||||
|
||||
suspend fun execute(textPath: String): List<AnnotatedString> {
|
||||
return repository.getBookText(textPath = textPath)
|
||||
suspend fun execute(bookId: Int): ChaptersAndText {
|
||||
return repository.getBookText(bookId = bookId)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ua.acclorite.book_story.domain.use_case.book
|
||||
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithTextAndCover
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithCover
|
||||
import ua.acclorite.book_story.domain.repository.BookRepository
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -8,9 +8,7 @@ class InsertBook @Inject constructor(
|
|||
private val repository: BookRepository
|
||||
) {
|
||||
|
||||
suspend fun execute(
|
||||
bookWithTextAndCover: BookWithTextAndCover
|
||||
): Boolean {
|
||||
return repository.insertBook(bookWithTextAndCover)
|
||||
suspend fun execute(bookWithCover: BookWithCover): Boolean {
|
||||
return repository.insertBook(bookWithCover)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package ua.acclorite.book_story.domain.use_case.book
|
||||
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithText
|
||||
import ua.acclorite.book_story.domain.repository.BookRepository
|
||||
import javax.inject.Inject
|
||||
|
||||
class UpdateBookWithText @Inject constructor(
|
||||
private val repository: BookRepository
|
||||
) {
|
||||
|
||||
suspend fun execute(bookWithText: BookWithText): Boolean {
|
||||
return repository.updateBookWithText(bookWithText)
|
||||
}
|
||||
}
|
||||
|
|
@ -9,11 +9,9 @@ fun BookInfoBackHandler(
|
|||
editTitle: Boolean,
|
||||
editAuthor: Boolean,
|
||||
editDescription: Boolean,
|
||||
isUpdating: Boolean,
|
||||
editTitleMode: (BookInfoEvent.OnEditTitleMode) -> Unit,
|
||||
editAuthorMode: (BookInfoEvent.OnEditAuthorMode) -> Unit,
|
||||
editDescriptionMode: (BookInfoEvent.OnEditDescriptionMode) -> Unit,
|
||||
cancelTextUpdate: (BookInfoEvent.OnCancelTextUpdate) -> Unit,
|
||||
navigateBack: () -> Unit
|
||||
) {
|
||||
BackHandler {
|
||||
|
|
@ -38,9 +36,6 @@ fun BookInfoBackHandler(
|
|||
return@BackHandler
|
||||
}
|
||||
|
||||
if (!isUpdating) {
|
||||
cancelTextUpdate(BookInfoEvent.OnCancelTextUpdate)
|
||||
navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package ua.acclorite.book_story.presentation.book_info
|
||||
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.util.BottomSheet
|
||||
|
|
@ -11,7 +10,6 @@ import ua.acclorite.book_story.ui.book_info.BookInfoScreen
|
|||
fun BookInfoBottomSheet(
|
||||
bottomSheet: BottomSheet?,
|
||||
book: Book,
|
||||
snackbarState: SnackbarHostState,
|
||||
canResetCover: Boolean,
|
||||
changeCover: (BookInfoEvent.OnChangeCover) -> Unit,
|
||||
resetCover: (BookInfoEvent.OnResetCover) -> Unit,
|
||||
|
|
@ -38,7 +36,6 @@ fun BookInfoBottomSheet(
|
|||
|
||||
BookInfoScreen.MORE_BOTTOM_SHEET -> {
|
||||
BookInfoMoreBottomSheet(
|
||||
snackbarState = snackbarState,
|
||||
showDetailsBottomSheet = showDetailsBottomSheet,
|
||||
showDeleteDialog = showDeleteDialog,
|
||||
showMoveDialog = showMoveDialog,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package ua.acclorite.book_story.presentation.book_info
|
|||
|
||||
import androidx.compose.foundation.lazy.LazyListState
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.pullrefresh.PullRefreshState
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.util.BottomSheet
|
||||
|
|
@ -16,12 +14,8 @@ fun BookInfoContent(
|
|||
book: Book,
|
||||
bottomSheet: BottomSheet?,
|
||||
dialog: Dialog?,
|
||||
refreshState: PullRefreshState,
|
||||
listState: LazyListState,
|
||||
snackbarState: SnackbarHostState,
|
||||
canResetCover: Boolean,
|
||||
isUpdating: Boolean,
|
||||
checkingForUpdate: Boolean,
|
||||
editTitle: Boolean,
|
||||
titleValue: String,
|
||||
editAuthor: Boolean,
|
||||
|
|
@ -48,14 +42,10 @@ fun BookInfoContent(
|
|||
resetCover: (BookInfoEvent.OnResetCover) -> Unit,
|
||||
deleteCover: (BookInfoEvent.OnDeleteCover) -> Unit,
|
||||
checkCoverReset: (BookInfoEvent.OnCheckCoverReset) -> Unit,
|
||||
actionUpdateDialog: (BookInfoEvent.OnActionUpdateDialog) -> Unit,
|
||||
dismissUpdateDialog: (BookInfoEvent.OnDismissUpdateDialog) -> Unit,
|
||||
dismissDialog: (BookInfoEvent.OnDismissDialog) -> Unit,
|
||||
dismissBottomSheet: (BookInfoEvent.OnDismissBottomSheet) -> Unit,
|
||||
updateData: (BookInfoEvent.OnUpdateData) -> Unit,
|
||||
copyToClipboard: (BookInfoEvent.OnCopyToClipboard) -> Unit,
|
||||
checkForTextUpdate: (BookInfoEvent.OnCheckForTextUpdate) -> Unit,
|
||||
cancelTextUpdate: (BookInfoEvent.OnCancelTextUpdate) -> Unit,
|
||||
navigateToReader: () -> Unit,
|
||||
navigateToLibrary: () -> Unit,
|
||||
navigateBack: () -> Unit
|
||||
|
|
@ -63,12 +53,9 @@ fun BookInfoContent(
|
|||
BookInfoDialog(
|
||||
dialog = dialog,
|
||||
book = book,
|
||||
snackbarState = snackbarState,
|
||||
actionDeleteDialog = actionDeleteDialog,
|
||||
actionMoveDialog = actionMoveDialog,
|
||||
dismissDialog = dismissDialog,
|
||||
actionUpdateDialog = actionUpdateDialog,
|
||||
dismissUpdateDialog = dismissUpdateDialog,
|
||||
navigateToLibrary = navigateToLibrary,
|
||||
navigateBack = navigateBack
|
||||
)
|
||||
|
|
@ -76,7 +63,6 @@ fun BookInfoContent(
|
|||
BookInfoBottomSheet(
|
||||
bottomSheet = bottomSheet,
|
||||
book = book,
|
||||
snackbarState = snackbarState,
|
||||
canResetCover = canResetCover,
|
||||
changeCover = changeCover,
|
||||
resetCover = resetCover,
|
||||
|
|
@ -91,11 +77,7 @@ fun BookInfoContent(
|
|||
|
||||
BookInfoScaffold(
|
||||
book = book,
|
||||
refreshState = refreshState,
|
||||
listState = listState,
|
||||
snackbarState = snackbarState,
|
||||
isUpdating = isUpdating,
|
||||
checkingForUpdate = checkingForUpdate,
|
||||
editTitle = editTitle,
|
||||
titleValue = titleValue,
|
||||
editAuthor = editAuthor,
|
||||
|
|
@ -114,8 +96,6 @@ fun BookInfoContent(
|
|||
showChangeCoverBottomSheet = showChangeCoverBottomSheet,
|
||||
showMoreBottomSheet = showMoreBottomSheet,
|
||||
updateData = updateData,
|
||||
checkForTextUpdate = checkForTextUpdate,
|
||||
cancelTextUpdate = cancelTextUpdate,
|
||||
navigateToReader = navigateToReader,
|
||||
navigateBack = navigateBack
|
||||
)
|
||||
|
|
@ -124,11 +104,9 @@ fun BookInfoContent(
|
|||
editTitle = editTitle,
|
||||
editAuthor = editAuthor,
|
||||
editDescription = editDescription,
|
||||
isUpdating = isUpdating,
|
||||
editTitleMode = editTitleMode,
|
||||
editAuthorMode = editAuthorMode,
|
||||
editDescriptionMode = editDescriptionMode,
|
||||
cancelTextUpdate = cancelTextUpdate,
|
||||
navigateBack = navigateBack
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package ua.acclorite.book_story.presentation.book_info
|
||||
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.util.Dialog
|
||||
|
|
@ -11,24 +10,13 @@ import ua.acclorite.book_story.ui.book_info.BookInfoScreen
|
|||
fun BookInfoDialog(
|
||||
dialog: Dialog?,
|
||||
book: Book,
|
||||
snackbarState: SnackbarHostState,
|
||||
actionDeleteDialog: (BookInfoEvent.OnActionDeleteDialog) -> Unit,
|
||||
actionMoveDialog: (BookInfoEvent.OnActionMoveDialog) -> Unit,
|
||||
dismissDialog: (BookInfoEvent.OnDismissDialog) -> Unit,
|
||||
actionUpdateDialog: (BookInfoEvent.OnActionUpdateDialog) -> Unit,
|
||||
dismissUpdateDialog: (BookInfoEvent.OnDismissUpdateDialog) -> Unit,
|
||||
navigateBack: () -> Unit,
|
||||
navigateToLibrary: () -> Unit
|
||||
) {
|
||||
when (dialog) {
|
||||
BookInfoScreen.UPDATE_DIALOG -> {
|
||||
BookInfoUpdateDialog(
|
||||
snackbarState = snackbarState,
|
||||
actionUpdateDialog = actionUpdateDialog,
|
||||
dismissUpdateDialog = dismissUpdateDialog
|
||||
)
|
||||
}
|
||||
|
||||
BookInfoScreen.DELETE_DIALOG -> {
|
||||
BookInfoDeleteDialog(
|
||||
actionDeleteDialog = actionDeleteDialog,
|
||||
|
|
|
|||
|
|
@ -31,14 +31,11 @@ import ua.acclorite.book_story.presentation.core.components.common.AnimatedVisib
|
|||
fun BoxScope.BookInfoFloatingActionButton(
|
||||
book: Book,
|
||||
listState: LazyListState,
|
||||
isUpdating: Boolean,
|
||||
navigateToReader: () -> Unit
|
||||
) {
|
||||
FloatingActionButton(
|
||||
onClick = {
|
||||
if (!isUpdating) {
|
||||
navigateToReader()
|
||||
}
|
||||
},
|
||||
shape = MaterialTheme.shapes.large,
|
||||
modifier = Modifier
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.Spacer
|
|||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
|
|
@ -17,7 +16,6 @@ import ua.acclorite.book_story.ui.book_info.BookInfoEvent
|
|||
|
||||
@Composable
|
||||
fun BookInfoMoreBottomSheet(
|
||||
snackbarState: SnackbarHostState,
|
||||
showDetailsBottomSheet: (BookInfoEvent.OnShowDetailsBottomSheet) -> Unit,
|
||||
showMoveDialog: (BookInfoEvent.OnShowMoveDialog) -> Unit,
|
||||
showDeleteDialog: (BookInfoEvent.OnShowDeleteDialog) -> Unit,
|
||||
|
|
@ -37,7 +35,6 @@ fun BookInfoMoreBottomSheet(
|
|||
primary = false,
|
||||
position = Position.SOLO
|
||||
) {
|
||||
snackbarState.currentSnackbarData?.dismiss()
|
||||
showDetailsBottomSheet(BookInfoEvent.OnShowDetailsBottomSheet)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.book_info
|
||||
|
||||
import androidx.compose.foundation.layout.BoxScope
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.pullrefresh.PullRefreshIndicator
|
||||
import androidx.compose.material.pullrefresh.PullRefreshState
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
fun BoxScope.BookInfoRefreshIndicator(
|
||||
isUpdating: Boolean,
|
||||
checkingForUpdate: Boolean,
|
||||
refreshState: PullRefreshState,
|
||||
paddingValues: PaddingValues
|
||||
) {
|
||||
PullRefreshIndicator(
|
||||
refreshing = isUpdating || checkingForUpdate,
|
||||
state = refreshState,
|
||||
Modifier
|
||||
.align(Alignment.TopCenter)
|
||||
.padding(top = paddingValues.calculateTopPadding()),
|
||||
backgroundColor = MaterialTheme.colorScheme.inverseSurface,
|
||||
contentColor = MaterialTheme.colorScheme.inverseOnSurface
|
||||
)
|
||||
}
|
||||
|
|
@ -5,31 +5,21 @@ import androidx.compose.foundation.layout.WindowInsets
|
|||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.navigationBars
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||
import androidx.compose.foundation.lazy.LazyListState
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.pullrefresh.PullRefreshState
|
||||
import androidx.compose.material.pullrefresh.pullRefresh
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.presentation.core.components.common.Snackbar
|
||||
import ua.acclorite.book_story.ui.book_info.BookInfoEvent
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
fun BookInfoScaffold(
|
||||
book: Book,
|
||||
refreshState: PullRefreshState,
|
||||
listState: LazyListState,
|
||||
snackbarState: SnackbarHostState,
|
||||
isUpdating: Boolean,
|
||||
checkingForUpdate: Boolean,
|
||||
editTitle: Boolean,
|
||||
titleValue: String,
|
||||
editAuthor: Boolean,
|
||||
|
|
@ -48,8 +38,6 @@ fun BookInfoScaffold(
|
|||
showChangeCoverBottomSheet: (BookInfoEvent.OnShowChangeCoverBottomSheet) -> Unit,
|
||||
showMoreBottomSheet: (BookInfoEvent.OnShowMoreBottomSheet) -> Unit,
|
||||
updateData: (BookInfoEvent.OnUpdateData) -> Unit,
|
||||
checkForTextUpdate: (BookInfoEvent.OnCheckForTextUpdate) -> Unit,
|
||||
cancelTextUpdate: (BookInfoEvent.OnCancelTextUpdate) -> Unit,
|
||||
navigateToReader: () -> Unit,
|
||||
navigateBack: () -> Unit
|
||||
) {
|
||||
|
|
@ -57,16 +45,12 @@ fun BookInfoScaffold(
|
|||
Modifier
|
||||
.fillMaxSize()
|
||||
.imePadding()
|
||||
.windowInsetsPadding(WindowInsets.navigationBars)
|
||||
.pullRefresh(refreshState),
|
||||
.windowInsetsPadding(WindowInsets.navigationBars),
|
||||
containerColor = MaterialTheme.colorScheme.surface,
|
||||
topBar = {
|
||||
BookInfoTopBar(
|
||||
book = book,
|
||||
listState = listState,
|
||||
snackbarState = snackbarState,
|
||||
isUpdating = isUpdating,
|
||||
checkingForUpdate = checkingForUpdate,
|
||||
editTitle = editTitle,
|
||||
titleValue = titleValue,
|
||||
editAuthor = editAuthor,
|
||||
|
|
@ -78,16 +62,8 @@ fun BookInfoScaffold(
|
|||
editDescriptionMode = editDescriptionMode,
|
||||
updateData = updateData,
|
||||
showMoreBottomSheet = showMoreBottomSheet,
|
||||
checkForTextUpdate = checkForTextUpdate,
|
||||
cancelTextUpdate = cancelTextUpdate,
|
||||
navigateBack = navigateBack
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
Snackbar(
|
||||
modifier = Modifier.padding(bottom = 70.dp),
|
||||
snackbarState = snackbarState
|
||||
)
|
||||
}
|
||||
) { paddingValues ->
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
|
|
@ -116,16 +92,8 @@ fun BookInfoScaffold(
|
|||
BookInfoFloatingActionButton(
|
||||
book = book,
|
||||
listState = listState,
|
||||
isUpdating = isUpdating,
|
||||
navigateToReader = navigateToReader
|
||||
)
|
||||
|
||||
BookInfoRefreshIndicator(
|
||||
isUpdating = isUpdating,
|
||||
checkingForUpdate = checkingForUpdate,
|
||||
refreshState = refreshState,
|
||||
paddingValues = paddingValues
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,15 +7,12 @@ import androidx.compose.foundation.lazy.LazyListState
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
|
||||
import androidx.compose.material.icons.outlined.Done
|
||||
import androidx.compose.material.icons.outlined.Refresh
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
|
|
@ -34,9 +31,6 @@ import ua.acclorite.book_story.ui.theme.Transitions
|
|||
fun BookInfoTopBar(
|
||||
book: Book,
|
||||
listState: LazyListState,
|
||||
snackbarState: SnackbarHostState,
|
||||
isUpdating: Boolean,
|
||||
checkingForUpdate: Boolean,
|
||||
editTitle: Boolean,
|
||||
titleValue: String,
|
||||
editAuthor: Boolean,
|
||||
|
|
@ -48,12 +42,8 @@ fun BookInfoTopBar(
|
|||
editDescriptionMode: (BookInfoEvent.OnEditDescriptionMode) -> Unit,
|
||||
updateData: (BookInfoEvent.OnUpdateData) -> Unit,
|
||||
showMoreBottomSheet: (BookInfoEvent.OnShowMoreBottomSheet) -> Unit,
|
||||
checkForTextUpdate: (BookInfoEvent.OnCheckForTextUpdate) -> Unit,
|
||||
cancelTextUpdate: (BookInfoEvent.OnCancelTextUpdate) -> Unit,
|
||||
navigateBack: () -> Unit
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
val firstVisibleItemIndex = remember {
|
||||
derivedStateOf {
|
||||
listState.firstVisibleItemIndex
|
||||
|
|
@ -99,8 +89,7 @@ fun BookInfoTopBar(
|
|||
}
|
||||
}
|
||||
} else {
|
||||
NavigatorBackIconButton(enabled = !isUpdating) {
|
||||
cancelTextUpdate(BookInfoEvent.OnCancelTextUpdate)
|
||||
NavigatorBackIconButton {
|
||||
navigateBack()
|
||||
}
|
||||
}
|
||||
|
|
@ -117,20 +106,6 @@ fun BookInfoTopBar(
|
|||
}
|
||||
},
|
||||
contentActions = {
|
||||
IconButton(
|
||||
icon = Icons.Outlined.Refresh,
|
||||
contentDescription = R.string.refresh_book_content_desc,
|
||||
disableOnClick = false,
|
||||
enabled = !isUpdating && !checkingForUpdate
|
||||
) {
|
||||
checkForTextUpdate(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = snackbarState,
|
||||
context = context
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Box {
|
||||
DefaultTransition(
|
||||
visible = !editTitle &&
|
||||
|
|
@ -152,8 +127,7 @@ fun BookInfoTopBar(
|
|||
icon = Icons.Outlined.Done,
|
||||
contentDescription = R.string.apply_changes_content_desc,
|
||||
disableOnClick = true,
|
||||
enabled = !isUpdating &&
|
||||
titleChanged ||
|
||||
enabled = titleChanged ||
|
||||
authorChanged ||
|
||||
descriptionChanged,
|
||||
color = if (
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.book_info
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Update
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.presentation.core.components.dialog.Dialog
|
||||
import ua.acclorite.book_story.ui.book_info.BookInfoEvent
|
||||
|
||||
@Composable
|
||||
fun BookInfoUpdateDialog(
|
||||
snackbarState: SnackbarHostState,
|
||||
actionUpdateDialog: (BookInfoEvent.OnActionUpdateDialog) -> Unit,
|
||||
dismissUpdateDialog: (BookInfoEvent.OnDismissUpdateDialog) -> Unit
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
Dialog(
|
||||
title = stringResource(id = R.string.confirm_update),
|
||||
imageVectorIcon = Icons.Default.Update,
|
||||
description = stringResource(
|
||||
id = R.string.confirm_update_description
|
||||
),
|
||||
actionText = stringResource(id = R.string.confirm),
|
||||
actionEnabled = true,
|
||||
onDismiss = { dismissUpdateDialog(BookInfoEvent.OnDismissUpdateDialog) },
|
||||
onAction = {
|
||||
actionUpdateDialog(
|
||||
BookInfoEvent.OnActionUpdateDialog(
|
||||
snackbarState = snackbarState,
|
||||
context = context
|
||||
)
|
||||
)
|
||||
},
|
||||
withDivider = false
|
||||
)
|
||||
}
|
||||
|
|
@ -40,14 +40,14 @@ fun BrowseAddDialogItem(result: SelectableNullableBook, onClick: (Boolean) -> Un
|
|||
Modifier.weight(1f)
|
||||
) {
|
||||
Text(
|
||||
text = result.data.bookWithTextAndCover!!.book.title,
|
||||
text = result.data.bookWithCover!!.book.title,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
Text(
|
||||
text = result.data.bookWithTextAndCover.book.author.asString(),
|
||||
text = result.data.bookWithCover.book.author.asString(),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 1,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ fun Constants.provideEmptyBook() = Book(
|
|||
title = "",
|
||||
author = UIText.StringValue(""),
|
||||
description = null,
|
||||
textPath = "",
|
||||
filePath = "",
|
||||
coverImage = null,
|
||||
scrollIndex = 0,
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ object DataStoreConstants {
|
|||
val PERCEPTION_EXPANDER = booleanPreferencesKey("perception_expander")
|
||||
val PERCEPTION_EXPANDER_PADDING = intPreferencesKey("perception_expander_padding")
|
||||
val PERCEPTION_EXPANDER_THICKNESS = intPreferencesKey("perception_expander_thickness")
|
||||
val CHECK_FOR_TEXT_UPDATE = booleanPreferencesKey("check_for_text_update")
|
||||
val CHECK_FOR_TEXT_UPDATE_TOAST = booleanPreferencesKey("check_for_text_update_toast")
|
||||
val SCREEN_ORIENTATION = stringPreferencesKey("screen_orientation")
|
||||
val CUSTOM_SCREEN_BRIGHTNESS = booleanPreferencesKey("custom_screen_brightness")
|
||||
val SCREEN_BRIGHTNESS = doublePreferencesKey("screen_brightness")
|
||||
|
|
|
|||
|
|
@ -95,20 +95,6 @@ fun Constants.provideHelpTips() = listOf(
|
|||
}
|
||||
),
|
||||
|
||||
HelpTip(
|
||||
title = R.string.help_title_how_to_update_book,
|
||||
description = {
|
||||
append(stringResource(id = R.string.help_desc_how_to_update_book_1) + " ")
|
||||
|
||||
HelpAnnotation {
|
||||
append(stringResource(id = R.string.help_desc_how_to_update_book_2))
|
||||
}
|
||||
append(" ")
|
||||
|
||||
append(stringResource(id = R.string.help_desc_how_to_update_book_3))
|
||||
}
|
||||
),
|
||||
|
||||
HelpTip(
|
||||
title = R.string.help_title_how_to_manage_history,
|
||||
description = {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import ua.acclorite.book_story.domain.reader.ReaderHorizontalGesture
|
|||
import ua.acclorite.book_story.domain.reader.ReaderTextAlignment
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.util.BottomSheet
|
||||
import ua.acclorite.book_story.domain.util.Dialog
|
||||
import ua.acclorite.book_story.domain.util.Drawer
|
||||
import ua.acclorite.book_story.ui.reader.ReaderEvent
|
||||
import ua.acclorite.book_story.ui.settings.SettingsEvent
|
||||
|
|
@ -26,7 +25,6 @@ import ua.acclorite.book_story.ui.settings.SettingsEvent
|
|||
fun ReaderContent(
|
||||
book: Book,
|
||||
text: List<AnnotatedString>,
|
||||
dialog: Dialog?,
|
||||
bottomSheet: BottomSheet?,
|
||||
drawer: Drawer?,
|
||||
listState: LazyListState,
|
||||
|
|
@ -40,8 +38,6 @@ fun ReaderContent(
|
|||
isLoading: Boolean,
|
||||
errorMessage: UIText?,
|
||||
checkpoint: Checkpoint,
|
||||
checkingForUpdate: Boolean,
|
||||
updateFound: Boolean,
|
||||
showMenu: Boolean,
|
||||
lockMenu: Boolean,
|
||||
chapters: Map<Int, Chapter>,
|
||||
|
|
@ -76,24 +72,13 @@ fun ReaderContent(
|
|||
openTranslator: (ReaderEvent.OnOpenTranslator) -> Unit,
|
||||
openDictionary: (ReaderEvent.OnOpenDictionary) -> Unit,
|
||||
scrollToChapter: (ReaderEvent.OnScrollToChapter) -> Unit,
|
||||
updateText: (ReaderEvent.OnUpdateText) -> Unit,
|
||||
dismissDialog: (ReaderEvent.OnDismissDialog) -> Unit,
|
||||
cancelCheckForTextUpdate: (ReaderEvent.OnCancelCheckForTextUpdate) -> Unit,
|
||||
showUpdateDialog: (ReaderEvent.OnShowUpdateDialog) -> Unit,
|
||||
showSettingsBottomSheet: (ReaderEvent.OnShowSettingsBottomSheet) -> Unit,
|
||||
dismissBottomSheet: (ReaderEvent.OnDismissBottomSheet) -> Unit,
|
||||
showChaptersDrawer: (ReaderEvent.OnShowChaptersDrawer) -> Unit,
|
||||
dismissDrawer: (ReaderEvent.OnDismissDrawer) -> Unit,
|
||||
navigateBack: () -> Unit,
|
||||
navigateToBookInfo: (startUpdate: Boolean) -> Unit
|
||||
navigateToBookInfo: () -> Unit
|
||||
) {
|
||||
ReaderDialog(
|
||||
dialog = dialog,
|
||||
updateText = updateText,
|
||||
dismissDialog = dismissDialog,
|
||||
navigateToBookInfo = navigateToBookInfo
|
||||
)
|
||||
|
||||
ReaderBottomSheet(
|
||||
bottomSheet = bottomSheet,
|
||||
fullscreenMode = fullscreenMode,
|
||||
|
|
@ -115,8 +100,6 @@ fun ReaderContent(
|
|||
isLoading = isLoading,
|
||||
errorMessage = errorMessage,
|
||||
checkpoint = checkpoint,
|
||||
checkingForUpdate = checkingForUpdate,
|
||||
updateFound = updateFound,
|
||||
showMenu = showMenu,
|
||||
lockMenu = lockMenu,
|
||||
chapters = chapters,
|
||||
|
|
@ -150,8 +133,6 @@ fun ReaderContent(
|
|||
openWebBrowser = openWebBrowser,
|
||||
openTranslator = openTranslator,
|
||||
openDictionary = openDictionary,
|
||||
cancelCheckForTextUpdate = cancelCheckForTextUpdate,
|
||||
showUpdateDialog = showUpdateDialog,
|
||||
showSettingsBottomSheet = showSettingsBottomSheet,
|
||||
showChaptersDrawer = showChaptersDrawer,
|
||||
navigateBack = navigateBack,
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.reader
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import ua.acclorite.book_story.domain.util.Dialog
|
||||
import ua.acclorite.book_story.ui.reader.ReaderEvent
|
||||
import ua.acclorite.book_story.ui.reader.ReaderScreen
|
||||
|
||||
@Composable
|
||||
fun ReaderDialog(
|
||||
dialog: Dialog?,
|
||||
updateText: (ReaderEvent.OnUpdateText) -> Unit,
|
||||
dismissDialog: (ReaderEvent.OnDismissDialog) -> Unit,
|
||||
navigateToBookInfo: (startUpdate: Boolean) -> Unit
|
||||
) {
|
||||
when (dialog) {
|
||||
ReaderScreen.UPDATE_DIALOG -> {
|
||||
ReaderUpdateDialog(
|
||||
updateText = updateText,
|
||||
dismissDialog = dismissDialog,
|
||||
navigateToBookInfo = navigateToBookInfo
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -45,8 +45,6 @@ fun ReaderScaffold(
|
|||
isLoading: Boolean,
|
||||
errorMessage: UIText?,
|
||||
checkpoint: Checkpoint,
|
||||
checkingForUpdate: Boolean,
|
||||
updateFound: Boolean,
|
||||
showMenu: Boolean,
|
||||
lockMenu: Boolean,
|
||||
chapters: Map<Int, Chapter>,
|
||||
|
|
@ -80,12 +78,10 @@ fun ReaderScaffold(
|
|||
openWebBrowser: (ReaderEvent.OnOpenWebBrowser) -> Unit,
|
||||
openTranslator: (ReaderEvent.OnOpenTranslator) -> Unit,
|
||||
openDictionary: (ReaderEvent.OnOpenDictionary) -> Unit,
|
||||
cancelCheckForTextUpdate: (ReaderEvent.OnCancelCheckForTextUpdate) -> Unit,
|
||||
showUpdateDialog: (ReaderEvent.OnShowUpdateDialog) -> Unit,
|
||||
showSettingsBottomSheet: (ReaderEvent.OnShowSettingsBottomSheet) -> Unit,
|
||||
showChaptersDrawer: (ReaderEvent.OnShowChaptersDrawer) -> Unit,
|
||||
navigateBack: () -> Unit,
|
||||
navigateToBookInfo: (startUpdate: Boolean) -> Unit
|
||||
navigateToBookInfo: () -> Unit
|
||||
) {
|
||||
Scaffold(
|
||||
Modifier
|
||||
|
|
@ -104,14 +100,10 @@ fun ReaderScaffold(
|
|||
fastColorPresetChange = fastColorPresetChange,
|
||||
currentChapterProgress = currentChapterProgress,
|
||||
isLoading = isLoading,
|
||||
checkingForUpdate = checkingForUpdate,
|
||||
updateFound = updateFound,
|
||||
lockMenu = lockMenu,
|
||||
leave = leave,
|
||||
selectPreviousPreset = selectPreviousPreset,
|
||||
selectNextPreset = selectNextPreset,
|
||||
cancelCheckForTextUpdate = cancelCheckForTextUpdate,
|
||||
showUpdateDialog = showUpdateDialog,
|
||||
showSettingsBottomSheet = showSettingsBottomSheet,
|
||||
showChaptersDrawer = showChaptersDrawer,
|
||||
navigateBack = navigateBack,
|
||||
|
|
|
|||
|
|
@ -1,21 +1,15 @@
|
|||
package ua.acclorite.book_story.presentation.reader
|
||||
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.animation.shrinkHorizontally
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.basicMarquee
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.material.icons.rounded.Menu
|
||||
import androidx.compose.material.icons.rounded.Upgrade
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
|
|
@ -24,7 +18,6 @@ import androidx.compose.material3.Text
|
|||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
|
|
@ -33,9 +26,7 @@ import androidx.compose.ui.unit.sp
|
|||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.presentation.core.components.common.AnimatedVisibility
|
||||
import ua.acclorite.book_story.presentation.core.components.common.IconButton
|
||||
import ua.acclorite.book_story.presentation.core.components.progress_indicator.CircularProgressIndicator
|
||||
import ua.acclorite.book_story.presentation.core.util.LocalActivity
|
||||
import ua.acclorite.book_story.presentation.core.util.noRippleClickable
|
||||
import ua.acclorite.book_story.ui.reader.ReaderEvent
|
||||
|
|
@ -50,18 +41,14 @@ fun ReaderTopBar(
|
|||
fastColorPresetChange: Boolean,
|
||||
currentChapterProgress: Float,
|
||||
isLoading: Boolean,
|
||||
checkingForUpdate: Boolean,
|
||||
updateFound: Boolean,
|
||||
lockMenu: Boolean,
|
||||
leave: (ReaderEvent.OnLeave) -> Unit,
|
||||
selectPreviousPreset: (SettingsEvent.OnSelectPreviousPreset) -> Unit,
|
||||
selectNextPreset: (SettingsEvent.OnSelectNextPreset) -> Unit,
|
||||
cancelCheckForTextUpdate: (ReaderEvent.OnCancelCheckForTextUpdate) -> Unit,
|
||||
showUpdateDialog: (ReaderEvent.OnShowUpdateDialog) -> Unit,
|
||||
showSettingsBottomSheet: (ReaderEvent.OnShowSettingsBottomSheet) -> Unit,
|
||||
showChaptersDrawer: (ReaderEvent.OnShowChaptersDrawer) -> Unit,
|
||||
navigateBack: () -> Unit,
|
||||
navigateToBookInfo: (startUpdate: Boolean) -> Unit
|
||||
navigateToBookInfo: () -> Unit
|
||||
) {
|
||||
val activity = LocalActivity.current
|
||||
val animatedChapterProgress = animateFloatAsState(
|
||||
|
|
@ -113,17 +100,13 @@ fun ReaderTopBar(
|
|||
ReaderEvent.OnLeave(
|
||||
activity = activity,
|
||||
navigate = {
|
||||
navigateToBookInfo(false)
|
||||
navigateToBookInfo()
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
.then(
|
||||
if (checkingForUpdate || updateFound) Modifier
|
||||
else Modifier.basicMarquee(iterations = Int.MAX_VALUE)
|
||||
)
|
||||
)
|
||||
.basicMarquee(iterations = Int.MAX_VALUE))
|
||||
},
|
||||
subtitle = {
|
||||
Text(
|
||||
|
|
@ -136,38 +119,6 @@ fun ReaderTopBar(
|
|||
)
|
||||
},
|
||||
actions = {
|
||||
AnimatedVisibility(
|
||||
visible = checkingForUpdate || updateFound,
|
||||
enter = fadeIn(),
|
||||
exit = shrinkHorizontally() + fadeOut()
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier.size(40.dp),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
if (updateFound) {
|
||||
IconButton(
|
||||
icon = Icons.Rounded.Upgrade,
|
||||
contentDescription = R.string.update_text_content_desc,
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
disableOnClick = false,
|
||||
enabled = !lockMenu && !checkingForUpdate
|
||||
) {
|
||||
showUpdateDialog(ReaderEvent.OnShowUpdateDialog)
|
||||
}
|
||||
} else {
|
||||
CircularProgressIndicator(
|
||||
modifier = Modifier
|
||||
.size(19.dp)
|
||||
.noRippleClickable {
|
||||
cancelCheckForTextUpdate(ReaderEvent.OnCancelCheckForTextUpdate)
|
||||
},
|
||||
strokeWidth = 2.4.dp
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentChapter != null) {
|
||||
IconButton(
|
||||
icon = Icons.Rounded.Menu,
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.reader
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.Upgrade
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.presentation.core.components.dialog.Dialog
|
||||
import ua.acclorite.book_story.presentation.core.util.LocalActivity
|
||||
import ua.acclorite.book_story.ui.reader.ReaderEvent
|
||||
|
||||
@Composable
|
||||
fun ReaderUpdateDialog(
|
||||
updateText: (ReaderEvent.OnUpdateText) -> Unit,
|
||||
dismissDialog: (ReaderEvent.OnDismissDialog) -> Unit,
|
||||
navigateToBookInfo: (startUpdate: Boolean) -> Unit
|
||||
) {
|
||||
val activity = LocalActivity.current
|
||||
|
||||
Dialog(
|
||||
title = stringResource(id = R.string.update_book),
|
||||
imageVectorIcon = Icons.Rounded.Upgrade,
|
||||
description = stringResource(
|
||||
id = R.string.update_book_description
|
||||
),
|
||||
actionText = stringResource(id = R.string.proceed),
|
||||
actionEnabled = true,
|
||||
onDismiss = { dismissDialog(ReaderEvent.OnDismissDialog) },
|
||||
onAction = {
|
||||
updateText(
|
||||
ReaderEvent.OnUpdateText(
|
||||
activity = activity,
|
||||
navigateToBookInfo = {
|
||||
navigateToBookInfo(true)
|
||||
}
|
||||
)
|
||||
)
|
||||
},
|
||||
withDivider = false
|
||||
)
|
||||
}
|
||||
|
|
@ -9,8 +9,6 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.presentation.settings.components.SettingsSubcategory
|
||||
import ua.acclorite.book_story.presentation.settings.reader.misc.components.CheckForTextUpdateOption
|
||||
import ua.acclorite.book_story.presentation.settings.reader.misc.components.CheckForTextUpdateToastOption
|
||||
import ua.acclorite.book_story.presentation.settings.reader.misc.components.FullscreenOption
|
||||
import ua.acclorite.book_story.presentation.settings.reader.misc.components.HideBarsOnFastScrollOption
|
||||
import ua.acclorite.book_story.presentation.settings.reader.misc.components.KeepScreenOnOption
|
||||
|
|
@ -27,14 +25,6 @@ fun LazyListScope.MiscSubcategory(
|
|||
showTitle = showTitle,
|
||||
showDivider = showDivider,
|
||||
) {
|
||||
item {
|
||||
CheckForTextUpdateOption()
|
||||
}
|
||||
|
||||
item {
|
||||
CheckForTextUpdateToastOption()
|
||||
}
|
||||
|
||||
item {
|
||||
FullscreenOption()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.settings.reader.misc.components
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.presentation.core.components.settings.SwitchWithTitle
|
||||
import ua.acclorite.book_story.ui.main.MainEvent
|
||||
import ua.acclorite.book_story.ui.main.MainModel
|
||||
|
||||
@Composable
|
||||
fun CheckForTextUpdateOption() {
|
||||
val mainModel = hiltViewModel<MainModel>()
|
||||
val state = mainModel.state.collectAsStateWithLifecycle()
|
||||
|
||||
SwitchWithTitle(
|
||||
selected = state.value.checkForTextUpdate,
|
||||
title = stringResource(id = R.string.check_for_text_update_option),
|
||||
description = stringResource(id = R.string.check_for_text_update_option_desc),
|
||||
onClick = {
|
||||
mainModel.onEvent(
|
||||
MainEvent.OnChangeCheckForTextUpdate(
|
||||
!state.value.checkForTextUpdate
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package ua.acclorite.book_story.presentation.settings.reader.misc.components
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.presentation.core.components.settings.SwitchWithTitle
|
||||
import ua.acclorite.book_story.ui.main.MainEvent
|
||||
import ua.acclorite.book_story.ui.main.MainModel
|
||||
import ua.acclorite.book_story.ui.theme.ExpandingTransition
|
||||
|
||||
@Composable
|
||||
fun CheckForTextUpdateToastOption() {
|
||||
val mainModel = hiltViewModel<MainModel>()
|
||||
val state = mainModel.state.collectAsStateWithLifecycle()
|
||||
|
||||
ExpandingTransition(visible = state.value.checkForTextUpdate) {
|
||||
SwitchWithTitle(
|
||||
selected = state.value.checkForTextUpdateToast,
|
||||
title = stringResource(id = R.string.check_for_text_update_toast_option),
|
||||
onClick = {
|
||||
mainModel.onEvent(
|
||||
MainEvent.OnChangeCheckForTextUpdateToast(
|
||||
!state.value.checkForTextUpdateToast
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,9 @@ package ua.acclorite.book_story.ui.book_info
|
|||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import ua.acclorite.book_story.domain.library.category.Category
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
|
||||
@Immutable
|
||||
sealed class BookInfoEvent {
|
||||
|
|
@ -54,14 +52,6 @@ sealed class BookInfoEvent {
|
|||
|
||||
data object OnUpdateData : BookInfoEvent()
|
||||
|
||||
data class OnShowSnackbar(
|
||||
val text: String,
|
||||
val action: String?,
|
||||
val onAction: () -> Unit = {},
|
||||
val durationMillis: Long,
|
||||
val snackbarState: SnackbarHostState
|
||||
) : BookInfoEvent()
|
||||
|
||||
data object OnShowChangeCoverBottomSheet : BookInfoEvent()
|
||||
|
||||
data class OnChangeCover(
|
||||
|
|
@ -101,23 +91,4 @@ sealed class BookInfoEvent {
|
|||
) : BookInfoEvent()
|
||||
|
||||
data object OnDismissDialog : BookInfoEvent()
|
||||
|
||||
data class OnCheckForTextUpdate(
|
||||
val snackbarState: SnackbarHostState,
|
||||
val context: Context
|
||||
) : BookInfoEvent()
|
||||
|
||||
data class OnShowUpdateDialog(
|
||||
val updatedText: List<String>,
|
||||
val updatedChapters: List<Chapter>
|
||||
) : BookInfoEvent()
|
||||
|
||||
data class OnActionUpdateDialog(
|
||||
val snackbarState: SnackbarHostState,
|
||||
val context: Context
|
||||
) : BookInfoEvent()
|
||||
|
||||
data object OnDismissUpdateDialog : BookInfoEvent()
|
||||
|
||||
data object OnCancelTextUpdate : BookInfoEvent()
|
||||
}
|
||||
|
|
@ -2,12 +2,9 @@ package ua.acclorite.book_story.ui.book_info
|
|||
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Context.CLIPBOARD_SERVICE
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Build
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.material3.SnackbarResult
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
|
|
@ -15,7 +12,6 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -24,36 +20,29 @@ import kotlinx.coroutines.sync.withLock
|
|||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.yield
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.domain.library.book.BookWithText
|
||||
import ua.acclorite.book_story.domain.library.category.Category
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.use_case.book.CanResetCover
|
||||
import ua.acclorite.book_story.domain.use_case.book.CheckForTextUpdate
|
||||
import ua.acclorite.book_story.domain.use_case.book.DeleteBooks
|
||||
import ua.acclorite.book_story.domain.use_case.book.GetBookById
|
||||
import ua.acclorite.book_story.domain.use_case.book.ResetCoverImage
|
||||
import ua.acclorite.book_story.domain.use_case.book.UpdateBook
|
||||
import ua.acclorite.book_story.domain.use_case.book.UpdateBookWithText
|
||||
import ua.acclorite.book_story.domain.use_case.book.UpdateCoverImageOfBook
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
import ua.acclorite.book_story.presentation.core.util.showToast
|
||||
import ua.acclorite.book_story.ui.browse.BrowseScreen
|
||||
import ua.acclorite.book_story.ui.history.HistoryScreen
|
||||
import ua.acclorite.book_story.ui.library.LibraryScreen
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@OptIn(FlowPreview::class)
|
||||
@HiltViewModel
|
||||
class BookInfoModel @Inject constructor(
|
||||
private val getBookById: GetBookById,
|
||||
private val checkForTextUpdate: CheckForTextUpdate,
|
||||
private val updateBook: UpdateBook,
|
||||
private val canResetCover: CanResetCover,
|
||||
private val updateCoverImageOfBook: UpdateCoverImageOfBook,
|
||||
private val resetCoverImage: ResetCoverImage,
|
||||
private val deleteBooks: DeleteBooks,
|
||||
private val updateBookWithText: UpdateBookWithText
|
||||
private val deleteBooks: DeleteBooks
|
||||
) : ViewModel() {
|
||||
|
||||
private val mutex = Mutex()
|
||||
|
|
@ -64,9 +53,6 @@ class BookInfoModel @Inject constructor(
|
|||
private var eventJob = SupervisorJob()
|
||||
private var resetJob: Job? = null
|
||||
|
||||
private var updateJob: Job? = null
|
||||
private var snackBarJob: Job? = null
|
||||
|
||||
fun onEvent(event: BookInfoEvent) {
|
||||
viewModelScope.launch(eventJob + Dispatchers.Main) {
|
||||
when (event) {
|
||||
|
|
@ -245,34 +231,6 @@ class BookInfoModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnShowSnackbar -> {
|
||||
launch {
|
||||
snackBarJob?.cancel()
|
||||
event.snackbarState.currentSnackbarData?.dismiss()
|
||||
|
||||
if (event.durationMillis > 0) {
|
||||
snackBarJob = launch(Dispatchers.IO) {
|
||||
yield()
|
||||
delay(event.durationMillis)
|
||||
yield()
|
||||
event.snackbarState.currentSnackbarData?.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
val snackbar = event.snackbarState.showSnackbar(
|
||||
event.text,
|
||||
actionLabel = event.action
|
||||
)
|
||||
|
||||
when (snackbar) {
|
||||
SnackbarResult.Dismissed -> Unit
|
||||
SnackbarResult.ActionPerformed -> {
|
||||
event.onAction()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnShowChangeCoverBottomSheet -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
|
|
@ -505,276 +463,12 @@ class BookInfoModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnCheckForTextUpdate -> {
|
||||
updateJob?.cancel()
|
||||
updateJob = launch(Dispatchers.IO) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = null,
|
||||
checkingForUpdate = true,
|
||||
editTitle = false,
|
||||
editAuthor = false,
|
||||
editDescription = false
|
||||
)
|
||||
}
|
||||
|
||||
yield()
|
||||
|
||||
val result = checkForTextUpdate.execute(bookId = _state.value.book.id)
|
||||
when (result) {
|
||||
is Resource.Success -> {
|
||||
if (result.data == null) {
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
event.context.getString(R.string.nothing_changed),
|
||||
action = null,
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
} else {
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowUpdateDialog(
|
||||
updatedText = result.data.first,
|
||||
updatedChapters = result.data.second
|
||||
)
|
||||
)
|
||||
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
|
||||
is Resource.Error -> {
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
text = result.message?.asString(event.context) ?: "",
|
||||
action = event.context.getString(R.string.retry),
|
||||
onAction = {
|
||||
onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = event.snackbarState,
|
||||
context = event.context
|
||||
)
|
||||
)
|
||||
},
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnShowUpdateDialog -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = BookInfoScreen.UPDATE_DIALOG,
|
||||
updatedText = event.updatedText,
|
||||
updatedChapters = event.updatedChapters
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnActionUpdateDialog -> {
|
||||
launch(Dispatchers.IO) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
isUpdating = true,
|
||||
dialog = null
|
||||
)
|
||||
}
|
||||
|
||||
if (_state.value.updatedText == null || _state.value.updatedChapters == null) {
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
text = event.context.getString(
|
||||
R.string.error_something_went_wrong_with_file
|
||||
),
|
||||
action = event.context.getString(R.string.retry),
|
||||
onAction = {
|
||||
onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = event.snackbarState,
|
||||
context = event.context
|
||||
)
|
||||
)
|
||||
},
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
isUpdating = false,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
|
||||
val updatedText = _state.value.updatedText ?: return@launch
|
||||
val updatedChapters = _state.value.updatedChapters ?: return@launch
|
||||
|
||||
updateBookWithText.execute(
|
||||
BookWithText(
|
||||
book = _state.value.book.copy(
|
||||
scrollIndex = (updatedText.size * _state.value.book.progress).roundToInt(),
|
||||
scrollOffset = 0,
|
||||
chapters = updatedChapters
|
||||
),
|
||||
text = updatedText
|
||||
)
|
||||
).apply {
|
||||
if (this) return@apply
|
||||
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
text = event.context.getString(
|
||||
R.string.error_something_went_wrong_with_file
|
||||
),
|
||||
action = event.context.getString(R.string.retry),
|
||||
onAction = {
|
||||
onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = event.snackbarState,
|
||||
context = event.context
|
||||
)
|
||||
)
|
||||
},
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
isUpdating = false,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
|
||||
getBookById.execute(_state.value.book.id).apply {
|
||||
if (this == null) {
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
text = event.context.getString(
|
||||
R.string.error_something_went_wrong_with_file
|
||||
),
|
||||
action = event.context.getString(R.string.retry),
|
||||
onAction = {
|
||||
onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = event.snackbarState,
|
||||
context = event.context
|
||||
)
|
||||
)
|
||||
},
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
isUpdating = false,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
|
||||
_state.update {
|
||||
it.copy(
|
||||
book = this,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
|
||||
LibraryScreen.refreshListChannel.trySend(0)
|
||||
HistoryScreen.refreshListChannel.trySend(0)
|
||||
|
||||
onEvent(
|
||||
BookInfoEvent.OnShowSnackbar(
|
||||
event.context.getString(R.string.book_updated),
|
||||
action = null,
|
||||
durationMillis = 4000L,
|
||||
snackbarState = event.snackbarState
|
||||
)
|
||||
)
|
||||
|
||||
delay(500)
|
||||
_state.update {
|
||||
it.copy(
|
||||
isUpdating = false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnDismissUpdateDialog -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = null,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is BookInfoEvent.OnCancelTextUpdate -> {
|
||||
_state.update {
|
||||
updateJob?.cancel()
|
||||
|
||||
it.copy(
|
||||
dialog = null,
|
||||
checkingForUpdate = false,
|
||||
updatedText = null,
|
||||
updatedChapters = null
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun init(
|
||||
bookId: Int,
|
||||
startUpdate: Boolean,
|
||||
snackbarState: SnackbarHostState,
|
||||
context: Context,
|
||||
navigateBack: () -> Unit
|
||||
) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
|
|
@ -797,14 +491,6 @@ class BookInfoModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
if (startUpdate) {
|
||||
onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = snackbarState,
|
||||
context = context
|
||||
)
|
||||
)
|
||||
}
|
||||
onEvent(BookInfoEvent.OnCheckCoverReset)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,11 @@ package ua.acclorite.book_story.ui.book_info
|
|||
import android.os.Parcelable
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.pullrefresh.rememberPullRefreshState
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import kotlinx.coroutines.channels.getOrElse
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import ua.acclorite.book_story.domain.navigator.Screen
|
||||
import ua.acclorite.book_story.presentation.book_info.BookInfoContent
|
||||
|
|
@ -26,15 +20,12 @@ import ua.acclorite.book_story.ui.reader.ReaderScreen
|
|||
data class BookInfoScreen(val bookId: Int) : Screen, Parcelable {
|
||||
|
||||
companion object {
|
||||
const val UPDATE_DIALOG = "update_dialog"
|
||||
const val DELETE_DIALOG = "delete_dialog"
|
||||
const val MOVE_DIALOG = "move_dialog"
|
||||
|
||||
const val CHANGE_COVER_BOTTOM_SHEET = "change_cover_bottom_sheet"
|
||||
const val MORE_BOTTOM_SHEET = "more_bottom_sheet"
|
||||
const val DETAILS_BOTTOM_SHEET = "details_bottom_sheet"
|
||||
|
||||
val startUpdateChannel: Channel<Boolean> = Channel(Channel.CONFLATED)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
|
|
@ -44,28 +35,11 @@ data class BookInfoScreen(val bookId: Int) : Screen, Parcelable {
|
|||
val screenModel = hiltViewModel<BookInfoModel>()
|
||||
|
||||
val state = screenModel.state.collectAsStateWithLifecycle()
|
||||
|
||||
val context = LocalContext.current
|
||||
val snackbarState = remember { SnackbarHostState() }
|
||||
val listState = rememberLazyListState()
|
||||
val refreshState = rememberPullRefreshState(
|
||||
refreshing = state.value.isUpdating || state.value.checkingForUpdate,
|
||||
onRefresh = {
|
||||
screenModel.onEvent(
|
||||
BookInfoEvent.OnCheckForTextUpdate(
|
||||
snackbarState = snackbarState,
|
||||
context = context
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
screenModel.init(
|
||||
bookId = bookId,
|
||||
startUpdate = startUpdateChannel.tryReceive().getOrElse { false },
|
||||
snackbarState = snackbarState,
|
||||
context = context,
|
||||
navigateBack = {
|
||||
navigator.pop()
|
||||
}
|
||||
|
|
@ -82,9 +56,7 @@ data class BookInfoScreen(val bookId: Int) : Screen, Parcelable {
|
|||
book = state.value.book,
|
||||
bottomSheet = state.value.bottomSheet,
|
||||
dialog = state.value.dialog,
|
||||
refreshState = refreshState,
|
||||
listState = listState,
|
||||
snackbarState = snackbarState,
|
||||
canResetCover = state.value.canResetCover,
|
||||
editTitle = state.value.editTitle,
|
||||
titleValue = state.value.titleValue,
|
||||
|
|
@ -92,8 +64,6 @@ data class BookInfoScreen(val bookId: Int) : Screen, Parcelable {
|
|||
authorValue = state.value.authorValue,
|
||||
editDescription = state.value.editDescription,
|
||||
descriptionValue = state.value.descriptionValue,
|
||||
isUpdating = state.value.isUpdating,
|
||||
checkingForUpdate = state.value.checkingForUpdate,
|
||||
editTitleMode = screenModel::onEvent,
|
||||
editTitleValueChange = screenModel::onEvent,
|
||||
editTitleRequestFocus = screenModel::onEvent,
|
||||
|
|
@ -116,12 +86,8 @@ data class BookInfoScreen(val bookId: Int) : Screen, Parcelable {
|
|||
actionMoveDialog = screenModel::onEvent,
|
||||
showDeleteDialog = screenModel::onEvent,
|
||||
actionDeleteDialog = screenModel::onEvent,
|
||||
actionUpdateDialog = screenModel::onEvent,
|
||||
dismissUpdateDialog = screenModel::onEvent,
|
||||
updateData = screenModel::onEvent,
|
||||
copyToClipboard = screenModel::onEvent,
|
||||
checkForTextUpdate = screenModel::onEvent,
|
||||
cancelTextUpdate = screenModel::onEvent,
|
||||
navigateToReader = {
|
||||
if (state.value.book.id != -1) {
|
||||
HistoryScreen.insertHistoryChannel.trySend(state.value.book.id)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package ua.acclorite.book_story.ui.book_info
|
|||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import ua.acclorite.book_story.domain.library.book.Book
|
||||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.util.BottomSheet
|
||||
import ua.acclorite.book_story.domain.util.Dialog
|
||||
import ua.acclorite.book_story.presentation.core.constants.Constants
|
||||
|
|
@ -12,11 +11,6 @@ import ua.acclorite.book_story.presentation.core.constants.provideEmptyBook
|
|||
data class BookInfoState(
|
||||
val book: Book = Constants.provideEmptyBook(),
|
||||
|
||||
val checkingForUpdate: Boolean = false,
|
||||
val isUpdating: Boolean = false,
|
||||
val updatedText: List<String>? = null,
|
||||
val updatedChapters: List<Chapter>? = null,
|
||||
|
||||
val editTitle: Boolean = false,
|
||||
val hasTitleFocused: Boolean = false,
|
||||
val titleValue: String = "",
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ class BrowseModel @Inject constructor(
|
|||
|
||||
var failed = false
|
||||
for (book in booksToInsert) {
|
||||
if (!insertBook.execute(book.bookWithTextAndCover!!)) {
|
||||
if (!insertBook.execute(book.bookWithCover!!)) {
|
||||
failed = true
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ sealed class MainEvent {
|
|||
data class OnChangePerceptionExpander(val value: Boolean) : MainEvent()
|
||||
data class OnChangePerceptionExpanderPadding(val value: Int) : MainEvent()
|
||||
data class OnChangePerceptionExpanderThickness(val value: Int) : MainEvent()
|
||||
data class OnChangeCheckForTextUpdate(val value: Boolean) : MainEvent()
|
||||
data class OnChangeCheckForTextUpdateToast(val value: Boolean) : MainEvent()
|
||||
data class OnChangeScreenOrientation(val value: String) : MainEvent()
|
||||
data class OnChangeCustomScreenBrightness(val value: Boolean) : MainEvent()
|
||||
data class OnChangeScreenBrightness(val value: Float) : MainEvent()
|
||||
|
|
|
|||
|
|
@ -343,22 +343,6 @@ class MainModel @Inject constructor(
|
|||
}
|
||||
)
|
||||
|
||||
is MainEvent.OnChangeCheckForTextUpdate -> handleDatastoreUpdate(
|
||||
key = DataStoreConstants.CHECK_FOR_TEXT_UPDATE,
|
||||
value = event.value,
|
||||
updateState = {
|
||||
it.copy(checkForTextUpdate = this)
|
||||
}
|
||||
)
|
||||
|
||||
is MainEvent.OnChangeCheckForTextUpdateToast -> handleDatastoreUpdate(
|
||||
key = DataStoreConstants.CHECK_FOR_TEXT_UPDATE_TOAST,
|
||||
value = event.value,
|
||||
updateState = {
|
||||
it.copy(checkForTextUpdateToast = this)
|
||||
}
|
||||
)
|
||||
|
||||
is MainEvent.OnChangeScreenOrientation -> handleDatastoreUpdate(
|
||||
key = DataStoreConstants.SCREEN_ORIENTATION,
|
||||
value = event.value,
|
||||
|
|
|
|||
|
|
@ -79,8 +79,6 @@ data class MainState(
|
|||
val perceptionExpander: Boolean = provideDefaultValue { false },
|
||||
val perceptionExpanderPadding: Int = provideDefaultValue { 5 },
|
||||
val perceptionExpanderThickness: Int = provideDefaultValue { 4 },
|
||||
val checkForTextUpdate: Boolean = provideDefaultValue { true },
|
||||
val checkForTextUpdateToast: Boolean = provideDefaultValue { true },
|
||||
val screenOrientation: ReaderScreenOrientation = provideDefaultValue {
|
||||
ReaderScreenOrientation.DEFAULT
|
||||
},
|
||||
|
|
@ -270,14 +268,6 @@ data class MainState(
|
|||
PERCEPTION_EXPANDER_THICKNESS
|
||||
) { perceptionExpanderThickness },
|
||||
|
||||
checkForTextUpdate = provideValue(
|
||||
CHECK_FOR_TEXT_UPDATE
|
||||
) { checkForTextUpdate },
|
||||
|
||||
checkForTextUpdateToast = provideValue(
|
||||
CHECK_FOR_TEXT_UPDATE_TOAST
|
||||
) { checkForTextUpdateToast },
|
||||
|
||||
screenOrientation = provideValue(
|
||||
SCREEN_ORIENTATION, convert = { toReaderScreenOrientation() }
|
||||
) { screenOrientation },
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ import androidx.compose.runtime.Immutable
|
|||
sealed class ReaderEvent {
|
||||
|
||||
data class OnLoadText(
|
||||
val checkForTextUpdate: Boolean,
|
||||
val checkForTextUpdateToast: Boolean,
|
||||
val context: Context
|
||||
) : ReaderEvent()
|
||||
|
||||
|
|
@ -62,22 +60,6 @@ sealed class ReaderEvent {
|
|||
val activity: ComponentActivity
|
||||
) : ReaderEvent()
|
||||
|
||||
data class OnCheckTextForUpdate(
|
||||
val showToast: Boolean,
|
||||
val context: Context
|
||||
) : ReaderEvent()
|
||||
|
||||
data class OnUpdateText(
|
||||
val activity: ComponentActivity,
|
||||
val navigateToBookInfo: () -> Unit
|
||||
) : ReaderEvent()
|
||||
|
||||
data object OnCancelCheckForTextUpdate : ReaderEvent()
|
||||
|
||||
data object OnShowUpdateDialog : ReaderEvent()
|
||||
|
||||
data object OnDismissDialog : ReaderEvent()
|
||||
|
||||
data object OnShowSettingsBottomSheet : ReaderEvent()
|
||||
|
||||
data object OnDismissBottomSheet : ReaderEvent()
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@ import ua.acclorite.book_story.R
|
|||
import ua.acclorite.book_story.domain.reader.Chapter
|
||||
import ua.acclorite.book_story.domain.reader.Checkpoint
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.use_case.book.CheckForTextUpdate
|
||||
import ua.acclorite.book_story.domain.use_case.book.GetBookById
|
||||
import ua.acclorite.book_story.domain.use_case.book.GetText
|
||||
import ua.acclorite.book_story.domain.use_case.book.UpdateBook
|
||||
import ua.acclorite.book_story.domain.use_case.history.GetLatestHistory
|
||||
import ua.acclorite.book_story.domain.util.Resource
|
||||
import ua.acclorite.book_story.presentation.core.util.coerceAndPreventNaN
|
||||
import ua.acclorite.book_story.presentation.core.util.launchActivity
|
||||
import ua.acclorite.book_story.presentation.core.util.setBrightness
|
||||
|
|
@ -51,8 +49,7 @@ class ReaderModel @Inject constructor(
|
|||
private val getBookById: GetBookById,
|
||||
private val updateBook: UpdateBook,
|
||||
private val getText: GetText,
|
||||
private val getLatestHistory: GetLatestHistory,
|
||||
private val checkForTextUpdate: CheckForTextUpdate
|
||||
private val getLatestHistory: GetLatestHistory
|
||||
) : ViewModel() {
|
||||
|
||||
private val mutex = Mutex()
|
||||
|
|
@ -64,30 +61,27 @@ class ReaderModel @Inject constructor(
|
|||
private var resetJob: Job? = null
|
||||
|
||||
private var scrollJob: Job? = null
|
||||
private var updateJob: Job? = null
|
||||
|
||||
fun onEvent(event: ReaderEvent) {
|
||||
viewModelScope.launch(eventJob + Dispatchers.Main) {
|
||||
when (event) {
|
||||
is ReaderEvent.OnLoadText -> {
|
||||
launch(Dispatchers.IO) {
|
||||
val text = getText.execute(_state.value.book.textPath)
|
||||
|
||||
val chaptersAndText = getText.execute(_state.value.book.id)
|
||||
yield()
|
||||
|
||||
if (text.isEmpty()) {
|
||||
if (chaptersAndText.text.isEmpty()) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
isLoading = false,
|
||||
errorMessage = UIText.StringResource(R.string.error_no_text)
|
||||
errorMessage = UIText.StringResource(R.string.error_no_text) //todo rename
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
|
||||
yield()
|
||||
|
||||
val lastOpened = getLatestHistory.execute(_state.value.book.id)?.time
|
||||
|
||||
yield()
|
||||
|
||||
_state.update {
|
||||
|
|
@ -95,7 +89,8 @@ class ReaderModel @Inject constructor(
|
|||
book = it.book.copy(
|
||||
lastOpened = lastOpened
|
||||
),
|
||||
text = text
|
||||
chapters = chaptersAndText.chapters,
|
||||
text = chaptersAndText.text
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -120,15 +115,6 @@ class ReaderModel @Inject constructor(
|
|||
updateChapter(index = scrollIndex)
|
||||
}
|
||||
|
||||
if (event.checkForTextUpdate) {
|
||||
onEvent(
|
||||
ReaderEvent.OnCheckTextForUpdate(
|
||||
showToast = event.checkForTextUpdateToast,
|
||||
context = event.context
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
_state.update {
|
||||
it.copy(
|
||||
isLoading = false,
|
||||
|
|
@ -412,105 +398,6 @@ class ReaderModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnCheckTextForUpdate -> {
|
||||
updateJob?.cancel()
|
||||
updateJob = launch(Dispatchers.IO) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = true,
|
||||
updateFound = false,
|
||||
dialog = null
|
||||
)
|
||||
}
|
||||
|
||||
yield()
|
||||
|
||||
val result = checkForTextUpdate.execute(bookId = _state.value.book.id)
|
||||
|
||||
yield()
|
||||
|
||||
when (result) {
|
||||
is Resource.Success -> {
|
||||
if (result.data == null) {
|
||||
withContext(Dispatchers.Main) {
|
||||
if (event.showToast) {
|
||||
event.context.getString(R.string.nothing_changed)
|
||||
.showToast(
|
||||
context = event.context,
|
||||
longToast = false
|
||||
)
|
||||
}
|
||||
}
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = false,
|
||||
updateFound = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
} else {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = ReaderScreen.UPDATE_DIALOG,
|
||||
updateFound = true,
|
||||
checkingForUpdate = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
|
||||
is Resource.Error -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
checkingForUpdate = false,
|
||||
updateFound = false
|
||||
)
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnUpdateText -> {
|
||||
launch {
|
||||
systemBarsVisibility(
|
||||
show = true,
|
||||
fullscreenMode = true,
|
||||
activity = event.activity
|
||||
)
|
||||
event.navigateToBookInfo()
|
||||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnCancelCheckForTextUpdate -> {
|
||||
_state.update {
|
||||
updateJob?.cancel()
|
||||
|
||||
it.copy(
|
||||
dialog = null,
|
||||
checkingForUpdate = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnShowUpdateDialog -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = ReaderScreen.UPDATE_DIALOG
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnDismissDialog -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
dialog = null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
is ReaderEvent.OnShowSettingsBottomSheet -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
|
|
@ -551,8 +438,6 @@ class ReaderModel @Inject constructor(
|
|||
fun init(
|
||||
bookId: Int,
|
||||
fullscreenMode: Boolean,
|
||||
checkForTextUpdate: Boolean,
|
||||
checkForTextUpdateToast: Boolean,
|
||||
activity: ComponentActivity,
|
||||
navigateBack: () -> Unit
|
||||
) {
|
||||
|
|
@ -584,8 +469,6 @@ class ReaderModel @Inject constructor(
|
|||
)
|
||||
onEvent(
|
||||
ReaderEvent.OnLoadText(
|
||||
checkForTextUpdate = checkForTextUpdate,
|
||||
checkForTextUpdateToast = checkForTextUpdateToast,
|
||||
context = activity
|
||||
)
|
||||
)
|
||||
|
|
@ -635,7 +518,7 @@ class ReaderModel @Inject constructor(
|
|||
}
|
||||
|
||||
private fun calculateCurrentChapter(index: Int): Pair<Chapter?, Float> {
|
||||
val currentChapter = _state.value.book.chapters.find { chapter ->
|
||||
val currentChapter = _state.value.chapters.find { chapter ->
|
||||
index in chapter.startIndex..chapter.endIndex
|
||||
}
|
||||
val currentChapterProgress = currentChapter.run {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ import ua.acclorite.book_story.ui.settings.SettingsModel
|
|||
data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
||||
|
||||
companion object {
|
||||
const val UPDATE_DIALOG = "update_dialog"
|
||||
const val CHAPTERS_DRAWER = "chapters_drawer"
|
||||
const val SETTINGS_BOTTOM_SHEET = "settings_bottom_sheet"
|
||||
}
|
||||
|
|
@ -225,9 +224,9 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
(mainState.value.bottomBarPadding * 4f).dp
|
||||
}
|
||||
|
||||
val chapters = remember(state.value.book.chapters) {
|
||||
val chapters = remember(state.value.chapters) {
|
||||
val chapters = mutableMapOf<Int, Chapter>()
|
||||
state.value.book.chapters.forEach {
|
||||
state.value.chapters.forEach {
|
||||
chapters[it.startIndex] = it
|
||||
}
|
||||
chapters
|
||||
|
|
@ -237,8 +236,6 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
screenModel.init(
|
||||
bookId = bookId,
|
||||
fullscreenMode = mainState.value.fullscreen,
|
||||
checkForTextUpdate = mainState.value.checkForTextUpdate,
|
||||
checkForTextUpdateToast = mainState.value.checkForTextUpdateToast,
|
||||
activity = activity,
|
||||
navigateBack = {
|
||||
navigator.pop()
|
||||
|
|
@ -301,7 +298,6 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
ReaderContent(
|
||||
book = state.value.book,
|
||||
text = state.value.text,
|
||||
dialog = state.value.dialog,
|
||||
bottomSheet = state.value.bottomSheet,
|
||||
drawer = state.value.drawer,
|
||||
listState = listState,
|
||||
|
|
@ -315,8 +311,6 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
isLoading = state.value.isLoading,
|
||||
errorMessage = state.value.errorMessage,
|
||||
checkpoint = state.value.checkpoint,
|
||||
checkingForUpdate = state.value.checkingForUpdate,
|
||||
updateFound = state.value.updateFound,
|
||||
showMenu = state.value.showMenu,
|
||||
lockMenu = state.value.lockMenu,
|
||||
chapters = chapters,
|
||||
|
|
@ -351,10 +345,6 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
openTranslator = screenModel::onEvent,
|
||||
openDictionary = screenModel::onEvent,
|
||||
scrollToChapter = screenModel::onEvent,
|
||||
updateText = screenModel::onEvent,
|
||||
cancelCheckForTextUpdate = screenModel::onEvent,
|
||||
showUpdateDialog = screenModel::onEvent,
|
||||
dismissDialog = screenModel::onEvent,
|
||||
showSettingsBottomSheet = screenModel::onEvent,
|
||||
dismissBottomSheet = screenModel::onEvent,
|
||||
showChaptersDrawer = screenModel::onEvent,
|
||||
|
|
@ -362,8 +352,7 @@ data class ReaderScreen(val bookId: Int) : Screen, Parcelable {
|
|||
navigateBack = {
|
||||
navigator.pop()
|
||||
},
|
||||
navigateToBookInfo = { startUpdate ->
|
||||
if (startUpdate) BookInfoScreen.startUpdateChannel.trySend(true)
|
||||
navigateToBookInfo = {
|
||||
navigator.push(
|
||||
BookInfoScreen(
|
||||
bookId = bookId,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import ua.acclorite.book_story.domain.reader.Chapter
|
|||
import ua.acclorite.book_story.domain.reader.Checkpoint
|
||||
import ua.acclorite.book_story.domain.ui.UIText
|
||||
import ua.acclorite.book_story.domain.util.BottomSheet
|
||||
import ua.acclorite.book_story.domain.util.Dialog
|
||||
import ua.acclorite.book_story.domain.util.Drawer
|
||||
import ua.acclorite.book_story.presentation.core.constants.Constants
|
||||
import ua.acclorite.book_story.presentation.core.constants.provideEmptyBook
|
||||
|
|
@ -16,6 +15,7 @@ import ua.acclorite.book_story.presentation.core.constants.provideEmptyBook
|
|||
@Immutable
|
||||
data class ReaderState(
|
||||
val book: Book = Constants.provideEmptyBook(),
|
||||
val chapters: List<Chapter> = emptyList(),
|
||||
val text: List<AnnotatedString> = emptyList(),
|
||||
val listState: LazyListState = LazyListState(),
|
||||
|
||||
|
|
@ -29,10 +29,6 @@ data class ReaderState(
|
|||
val checkpoint: Checkpoint = Checkpoint(0, 0),
|
||||
val lockMenu: Boolean = false,
|
||||
|
||||
val checkingForUpdate: Boolean = false,
|
||||
val updateFound: Boolean = false,
|
||||
|
||||
val dialog: Dialog? = null,
|
||||
val bottomSheet: BottomSheet? = null,
|
||||
val drawer: Drawer? = null
|
||||
)
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
<string name="storage_permission_description">نحتاج إذن التخزين لفحص جهازك من أجل الكتب. من دون هذا الإذن، لن تكون قادرا على إضافة كتاب.</string>
|
||||
<string name="updates_notification_desc">التحديث %1$s تم نشره للتو! انقر للذهاب الى صفحة الإصدار.</string>
|
||||
<string name="move_book_description">اختر الفئة التي تريد نقل هذا الكتاب إليها. سيتم نقل هذا الكتاب إلى الفئة المختارة.</string>
|
||||
<string name="confirm_update_description">تحديث نص و فصول هذا الكتاب. ينبغي ان يظل التقدم كما هو ما لم يتم تغيير الفقرات.</string>
|
||||
<string name="update_app_description">تم العثور على إصدار جديد من Book\'s Story. هل تريد الإنتقال الى صفحة الاصدار ؟</string>
|
||||
<string name="updates_notification_channel">التحديثات الجديدة</string>
|
||||
<string name="updates_notification_title">تحديث جديد ل Book\'s Story!</string>
|
||||
|
|
@ -22,7 +21,6 @@
|
|||
<string name="delete_book">حذف الكتاب؟</string>
|
||||
<string name="move_book">نقل الكتاب؟</string>
|
||||
<string name="delete_history">حذف سجل القراءة؟</string>
|
||||
<string name="confirm_update">تأكيد التحديث؟</string>
|
||||
<string name="enable_check_for_updates">تفعيل التحقق من التنبيهات؟</string>
|
||||
<string name="move_books_description">اختر الفئة التي تريد نقل جميع الكتب%1$s المختارة إليها. جميع الكتب المختارة سيتم نقلها إلى الفئة المختارة.</string>
|
||||
<string name="delete_books_description">هذا سيحذف جميع الكتب%1$sالمختارة من قاعدة البيانات. هذا لن يحذف الكتب المختارة من جهازك.</string>
|
||||
|
|
@ -77,7 +75,6 @@
|
|||
<string name="copy">نسخ</string>
|
||||
<string name="translate">ترجمة</string>
|
||||
<string name="dictionary">القاموس</string>
|
||||
<string name="retry">أعد المحاولة</string>
|
||||
<string name="next">التالي</string>
|
||||
<string name="text_reader_settings">نص</string>
|
||||
<string name="yes_go_to_help">نعم، اذهب إلى المساعدة</string>
|
||||
|
|
@ -89,7 +86,6 @@
|
|||
<string name="unknown_author">غير معروف</string>
|
||||
<string name="delete">حذف</string>
|
||||
<string name="move">نقل</string>
|
||||
<string name="confirm">تأكيد</string>
|
||||
<string name="reset_cover_desc">إعادة ضبط صورة غلاف الكتاب الى الافتراضي</string>
|
||||
<string name="change_cover">تغيير صورة الغلاف</string>
|
||||
<string name="change_cover_desc">اختر غلاف جديد من صورك</string>
|
||||
|
|
@ -172,11 +168,9 @@
|
|||
<string name="books_added">تم اضافة جميع الكتب المختارة بنجاح.</string>
|
||||
<string name="font_style_normal">عادي</string>
|
||||
<string name="history_element_deleted">تم محو عناصر السجل بنجاح.</string>
|
||||
<string name="book_updated">تم تحديث نص الكتاب بنجاح.</string>
|
||||
<string name="file_size">حجم الملف</string>
|
||||
<string name="unknown">غير معروف</string>
|
||||
<string name="browse_grid_size_option">حجم الشبكة</string>
|
||||
<string name="nothing_changed">النص محدث.</string>
|
||||
<string name="app_version_option">إصدار التطبيق</string>
|
||||
<string name="app_version_option_desc_1">قصة كتاب الإصدار%1$s</string>
|
||||
<string name="licenses_option">رخص مفتوحة المصدر</string>
|
||||
|
|
@ -184,7 +178,6 @@
|
|||
<string name="credits_updates">إدارة التحديثات الجديدة</string>
|
||||
<string name="text_alignment_start">ابدأ</string>
|
||||
<string name="text_alignment_center">المركز</string>
|
||||
<string name="file_not_found">لم يتم العثور على الملف \"%1$s\"</string>
|
||||
<string name="move_this_book">نقل</string>
|
||||
<string name="delete_this_book">حذف</string>
|
||||
<string name="details_book">التفاصيل</string>
|
||||
|
|
@ -239,14 +232,10 @@
|
|||
<string name="vertical_padding_option">الحشو العمودي</string>
|
||||
<string name="reading_speed_reader_settings">سرعة القراءة</string>
|
||||
<string name="default_string">الافتراضي</string>
|
||||
<string name="update_book">تحديث الكتاب؟</string>
|
||||
<string name="update_book_description">تم ايجاد تحديث للنص ، التحديث مطلوب لضمان ان احدث اساليب الفرز يتم استخدامها ، لا تحتاج الى اتصال انترنت ، لن تفقد تقدمك ما لم تحدث تغييرات كبيرة . هل تريد المضي قدما بالتحديث؟</string>
|
||||
<string name="proceed">المضي قدما</string>
|
||||
<string name="system_reader_settings">النظام</string>
|
||||
<string name="random_string">عشوائي</string>
|
||||
<string name="search_field_empty">بحث…</string>
|
||||
<string name="check_for_text_update_option">التحقق من تحديث النص</string>
|
||||
<string name="check_for_text_update_option_desc">تحقق تلقائيا ان كان هناك تحديث للنص</string>
|
||||
<string name="screen_orientation_option">اتجاه الشاشة</string>
|
||||
<string name="screen_orientation_free">حر</string>
|
||||
<string name="contributors_option">المساهمون</string>
|
||||
|
|
@ -269,7 +258,6 @@
|
|||
<string name="library_content_desc">مكتبتك</string>
|
||||
<string name="slava_ukraini">المجد لأوكرانيا!</string>
|
||||
<string name="cutout_padding_option">قطع هوامش</string>
|
||||
<string name="refresh_book_content_desc">تحديث الكتاب</string>
|
||||
<string name="side_padding_option">هامش جانبي</string>
|
||||
<string name="apply_changes_content_desc">تأكيد التغييرات</string>
|
||||
<string name="history_content_desc">قراءتك الماضية</string>
|
||||
|
|
@ -277,10 +265,8 @@
|
|||
<string name="add_files_content_desc">إضافة ملفات</string>
|
||||
<string name="help_desc_how_to_read_book_1">اذهب الى</string>
|
||||
<string name="drag_content_desc">جر</string>
|
||||
<string name="update_text_content_desc">تحديث النص</string>
|
||||
<string name="help_desc_how_to_move_or_delete_books_3">اضغط باستمرار على صورة غلاف الكتاب الأول حتى يتم تحديدها، والآن يمكنك ببساطة النقر فوق جميع صور أغلفة الكتب التي تريد تحديدها. يمكنك أيضًا تحديد الكتب في فئات متعددة. بعد تحديد جميع الكتب المطلوبة، يمكنك النقر فوق رمز السهم لنقلها ورمز سلة المهملات لحذف الكتب.</string>
|
||||
<string name="help_desc_how_to_read_book_3">لبدء قراءة الكتاب اضغط على الزر الموجود في الزاوية اليمنى السفلية للكتاب الذي تريد قراءته. كما يمكنك البدء في قراءة الكتاب بالنقر على صورة غلافه لرؤية تفاصيل الكتاب ثم اضغط على الزر الموجود في الزاوية اليمنى السفلية. سيتم حفظ مكان القراءة واستعادته تلقائيًا. يمكنك تحريك الشريطين العلوي والسفلي بالنقر في أي مكان على الشاشة. بالنقر فوق عنوان الكتاب سيتم نقلك إلى تفاصيل الكتاب. إذا قمت بالنقر فوق رمز الترس سترى إعدادات القراءة. يمكنك استخدام شريط التمرير في الشريط السفلي للتحرك للأمام أو للخلف.</string>
|
||||
<string name="help_title_how_to_update_book">كيف أقوم بتحديث كتاب؟?</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">الاعدادات</string>
|
||||
<string name="help_desc_how_to_manage_history_1">اذهب الى</string>
|
||||
<string name="help_title_how_to_manage_history">كيف أدير السجل؟</string>
|
||||
|
|
@ -292,9 +278,6 @@
|
|||
<string name="screen_orientation_locked_landscape">الوضع الافقي المقفل</string>
|
||||
<string name="help_desc_how_to_read_book_2">المكتبة</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">و اختر فئة القارئ لتخصيص الاعدادات العامة، أو فئة المظهر لتخصيص اعدادات الألوان.</string>
|
||||
<string name="help_desc_how_to_update_book_1">اذهب الى</string>
|
||||
<string name="help_desc_how_to_update_book_2">المكتبة</string>
|
||||
<string name="credits_option">الاعتمادات</string>
|
||||
<string name="help_desc_how_to_customize_reader_1">ابدأ بقراءة الكتاب (انظر: كيف أقرأ كتاباً؟ ) بعد ذلك أحضر الاشرطة العلوية و السفلية بالنقر في أي مكان على الشاشة ثم اضغط على أيقونة الاعدادات في الزاوية اليمنى. هذا سيظهر كل اعدادات القارئ. الطريقة الثانية هي الذهاب إلى</string>
|
||||
<string name="help_desc_how_to_update_book_3">و انقر على غلاف الكتاب لرؤية تفاصيل الكتاب اسحب الشاشة أو اضغط على أيقونة إعادة التحميل في الزاوية العلوية اليمنى لتحديث الكتاب. إذا تغير ملف الكتاب يمكنك تأكيد و تحديث الكتاب أو إلغاء التحديث.</string>
|
||||
</resources>
|
||||
|
|
@ -13,13 +13,11 @@
|
|||
<string name="delete_book">Buch löschen?</string>
|
||||
<string name="move_book">Buch verschieben?</string>
|
||||
<string name="delete_history">Leseverlauf löschen?</string>
|
||||
<string name="confirm_update">Update bestätigen?</string>
|
||||
<string name="enable_check_for_updates">Überprüfen von Updates aktivieren?</string>
|
||||
<string name="add_books_description">Sie können auswählen, welche Bücher Sie hinzufügen möchten. Titel und Coverbild des Buches können Sie später bearbeiten. Der Ladevorgang kann mehrere Minuten dauern.</string>
|
||||
<string name="move_books_description">Wählen Sie die Kategorie, in die Sie alle ausgewählten Bücher verschieben möchten (%1$s). Alle ausgewählten Bücher werden in die ausgewählte Kategorie verschoben.</string>
|
||||
<string name="delete_book_description">Dadurch wird das Buch aus der Datenbank gelöscht. Von Ihrem Gerät wird das Buch jedoch nicht gelöscht.</string>
|
||||
<string name="move_book_description">Wählen Sie die Kategorie aus, in die Sie dieses Buch verschieben möchten. Dieses Buch wird in die ausgewählte Kategorie verschoben.</string>
|
||||
<string name="confirm_update_description">Aktualisieren Sie den Text und die Kapitel dieses Buches. Der Fortschritt sollte unverändert bleiben, sofern die Reihenfolge der Absätze nicht geändert wurde.</string>
|
||||
<string name="enable_check_for_updates_description">Durch Aktivieren von „Nach Updates suchen“ ruft die App bei jedem Start der App die neuesten Versionsinformationen von „api.github.com“ ab. Möchten Sie fortfahren und „Nach Updates suchen“ aktivieren?</string>
|
||||
<string name="error_no_description">Keine Beschreibung.</string>
|
||||
<string name="error_no_text">Der Buchinhalt ist leer. Bitte stellen Sie sicher, dass der Buchinhalt nicht leer ist und aktualisieren Sie ihn.</string>
|
||||
|
|
@ -47,8 +45,6 @@
|
|||
<string name="copy">Kopieren</string>
|
||||
<string name="translate">Übersetzen</string>
|
||||
<string name="dictionary">Wörterbuch</string>
|
||||
<string name="retry">Wiederholen</string>
|
||||
<string name="confirm">Bestätigen</string>
|
||||
<string name="next">Nächste</string>
|
||||
<string name="no">Nein</string>
|
||||
<string name="done">Fertig</string>
|
||||
|
|
@ -114,9 +110,6 @@
|
|||
<string name="no_updates">Die neuste Version der App ist bereits installiert.</string>
|
||||
<string name="cover_reset">Das Titelbild wurde erfolgreich zurückgesetzt.</string>
|
||||
<string name="history_element_deleted">Das Verlaufselement wurde erfolgreich gelöscht.</string>
|
||||
<string name="file_not_found">Die Datei „%1$s“ wurde nicht gefunden.</string>
|
||||
<string name="book_updated">Der Buchtext wurde erfolgreich aktualisiert.</string>
|
||||
<string name="nothing_changed">Der Text ist aktuell.</string>
|
||||
<string name="move_this_book">Verschieben</string>
|
||||
<string name="delete_this_book">Löschen</string>
|
||||
<string name="dynamic_theme">Quecksilber</string>
|
||||
|
|
@ -144,9 +137,6 @@
|
|||
<string name="help_desc_how_to_read_book_2">Bibliothek</string>
|
||||
<string name="help_title_how_to_customize_reader">Wie passe ich den Reader an?</string>
|
||||
<string name="help_desc_how_to_customize_reader_1">Beginnen Sie mit dem Lesen des Buches (siehe: Wie lese ich ein Buch?), und bringen Sie dann die oberen und unteren Balken zum Vorschein, indem Sie irgendwo auf den Bildschirm klicken. Klicken Sie dann auf das Zahnradsymbol in der oberen rechten Ecke. Dadurch werden alle Reader-Einstellungen angezeigt. Der zweite Weg ist, zu den</string>
|
||||
<string name="help_desc_how_to_update_book_1">Gehen Sie zum</string>
|
||||
<string name="help_desc_how_to_update_book_2">Bibliothek</string>
|
||||
<string name="help_desc_how_to_update_book_3">und klicken Sie auf das Coverbild des Buches, um die Buchdetails anzuzeigen. Ziehen Sie den Bildschirm nach unten oder klicken Sie auf das Aktualisierungssymbol in der oberen rechten Ecke, um das Buch zu aktualisieren. Wenn sich die Buchdatei geändert hat, können Sie das Buch bestätigen und aktualisieren oder die Aktualisierung abbrechen.</string>
|
||||
<string name="start_permissions_granted">Gewährt</string>
|
||||
<string name="start_permissions_storage">Speicherberechtigung</string>
|
||||
<string name="start_permissions_storage_desc">Erforderlich, um Ihr Gerät zu scannen und Bücher zu finden</string>
|
||||
|
|
@ -156,7 +146,6 @@
|
|||
<string name="start_done_desc">Sie haben die Grundeinstellungen der App erfolgreich abgeschlossen. Möchten Sie anhand des Hilfebildschirms erfahren, wie Sie die App verwenden?</string>
|
||||
<string name="today">Heute</string>
|
||||
<string name="yesterday">Gestern</string>
|
||||
<string name="refresh_book_content_desc">Buch aktualisieren</string>
|
||||
<string name="continue_reading_content_desc">Weiterlesen</string>
|
||||
<string name="go_back_content_desc">Geh zurück</string>
|
||||
<string name="cover_image_content_desc">Titelbild</string>
|
||||
|
|
@ -236,7 +225,6 @@
|
|||
<string name="help_title_how_to_edit_book">Wie bearbeite ich ein Buch?</string>
|
||||
<string name="help_desc_how_to_read_book_3">Um mit dem Lesen des Buches zu beginnen, klicken Sie auf die Schaltfläche in der unteren rechten Ecke des Buches, das Sie lesen möchten. Sie können das Buch auch lesen, indem Sie auf das Coverbild klicken, um die Buchdetails anzuzeigen, und dann auf die Schaltfläche in der unteren rechten Ecke klicken. Der Fortschritt wird automatisch gespeichert und wiederhergestellt. Sie können die oberen und unteren Leisten einblenden, indem Sie irgendwo auf den Bildschirm klicken. Wenn Sie auf den Titel des Buches klicken, gelangen Sie zu den Buchdetails. Wenn Sie auf das Zahnradsymbol klicken, werden die Reader-Einstellungen angezeigt. Sie können den Schieberegler der unteren Leiste verwenden, um den Fortschritt zu ändern.</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">Einstellungen</string>
|
||||
<string name="help_title_how_to_update_book">Wie aktualisiere ich ein Buch?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Gehen Sie zum</string>
|
||||
<string name="help_desc_how_to_use_tooltip_1">Die meisten Symbolschaltflächen haben Tooltips. Diese können Ihnen helfen, wenn Sie nicht wissen, was eine Symbolschaltfläche macht. Um den Tooltip anzuzeigen, können Sie eine Symbolschaltfläche gedrückt halten.</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">und wählen Sie die Kategorie „Reader“, um die allgemeinen Einstellungen anzupassen, oder die Kategorie „Darstellung“, um die Farbeinstellungen anzupassen.</string>
|
||||
|
|
@ -330,16 +318,10 @@
|
|||
<string name="fullscreen_option_desc">Systemleisten ausblenden und Polsterung entfernen</string>
|
||||
<string name="cutout_padding_option_desc">Polsterung auf Ausschnittbereich auftragen</string>
|
||||
<string name="cutout_padding_option">Aussparungspolster</string>
|
||||
<string name="check_for_text_update_option">Auf Textaktualisierungen prüfen</string>
|
||||
<string name="update_text_content_desc">Text aktualisieren</string>
|
||||
<string name="default_string">Standard</string>
|
||||
<string name="update_book">Bücher updaten?</string>
|
||||
<string name="update_book_description">Es wurde ein Update des Textes gefunden. Das Update ist erforderlich, um sicherzustellen, dass die neuesten Parsermethoden verwendet werden. Es handelt sich um einen Offline-Prozess. Ihr Fortschritt wird nicht beeinträchtigt, sofern keine großen Änderungen auftreten. Möchten Sie mit dem Update fortfahren?</string>
|
||||
<string name="proceed">Fortfahren</string>
|
||||
<string name="perception_expander_padding_option">Zeilenauffüllung des Perception Expander</string>
|
||||
<string name="perception_expander_thickness_option">Linienstärke des Perception Expander</string>
|
||||
<string name="check_for_text_update_option_desc">Automatisch prüfen, ob ein Text-Update vorliegt</string>
|
||||
<string name="check_for_text_update_toast_option">Toast „Text ist aktuell“ anzeigen</string>
|
||||
<string name="screen_orientation_option">Bildschirmausrichtung</string>
|
||||
<string name="screen_orientation_free">Frei</string>
|
||||
<string name="screen_orientation_portrait">Porträt</string>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
<string name="updates_notification_title">¡Nueva actualización de Book\'s Story!</string>
|
||||
<string name="move_book">¿Mover libro?</string>
|
||||
<string name="delete_history">¿Borrar el historial de lectura?</string>
|
||||
<string name="confirm_update">¿Confirmar actualización?</string>
|
||||
<string name="enable_check_for_updates">¿Comprobar actualizaciones?</string>
|
||||
<string name="move_books_description">Elija la categoría a la que desea mover todos los libros seleccionados (%1$s). Todos los libros seleccionados serán trasladados a la categoría seleccionada.</string>
|
||||
<string name="move_book_description">Elija la categoría a la que quiere mover este libro. Este libro será trasladado a la categoría seleccionada.</string>
|
||||
|
|
@ -35,7 +34,6 @@
|
|||
<string name="get_help">Necesito ayuda</string>
|
||||
<string name="add_book">Añadir un libro</string>
|
||||
<string name="move">Mover</string>
|
||||
<string name="retry">Reintentar</string>
|
||||
<string name="read_more">¡Necesitas leer más!</string>
|
||||
<string name="read_done">¡Bien hecho, has leído todo el libro!</string>
|
||||
<string name="change_cover">Cambiar portada</string>
|
||||
|
|
@ -111,7 +109,6 @@
|
|||
<string name="never">Nunca</string>
|
||||
<string name="go_back">Regresar</string>
|
||||
<string name="copy">Copiar</string>
|
||||
<string name="confirm">Confirmar</string>
|
||||
<string name="done">Hecho</string>
|
||||
<string name="undo">Deshacer</string>
|
||||
<string name="next">Siguiente</string>
|
||||
|
|
@ -158,7 +155,6 @@
|
|||
<string name="blue_theme">Neptuno</string>
|
||||
<string name="green_theme">Tierra</string>
|
||||
<string name="red_theme">Marte</string>
|
||||
<string name="confirm_update_description">Actualizar el texto y los capítulos de este libro. El progreso debe permanecer inalterado a menos que se haya modificado el orden de los párrafos.</string>
|
||||
<string name="color_preset_query">Por defecto %1$s</string>
|
||||
<string name="color_preset_selected_query">Seleccionado « %1$s »</string>
|
||||
<string name="color_preset_option">Color preestablecido</string>
|
||||
|
|
@ -167,8 +163,6 @@
|
|||
<string name="color_preset_placeholder">Nombrar un preajuste…</string>
|
||||
<string name="book_moved">Este libro se movió correctamente.</string>
|
||||
<string name="history_element_deleted">El elemento del historial se eliminó correctamente.</string>
|
||||
<string name="file_not_found">No se ha encontrado el archivo \"%1$s\".</string>
|
||||
<string name="book_updated">El texto del libro se ha actualizado correctamente.</string>
|
||||
<string name="details_book">Detalles</string>
|
||||
<string name="file_name">Nombre del archivo</string>
|
||||
<string name="file_last_opened">Último archivo abierto</string>
|
||||
|
|
@ -192,7 +186,6 @@
|
|||
<string name="help_desc_how_to_edit_book_3">y haz clic en la imagen de la portada del libro para ver los detalles del libro. Ahora puedes mantener presionado el título, el autor o la descripción del libro para editarlo o la imagen de la portada para cambiarla, restablecerla o eliminarla.</string>
|
||||
<string name="help_title_how_to_customize_reader">¿Cómo personalizo el lector?</string>
|
||||
<string name="move_this_book">Mover</string>
|
||||
<string name="nothing_changed">El texto está actualizado.</string>
|
||||
<string name="delete_this_book">Borrar</string>
|
||||
<string name="file_path">Ruta del archivo</string>
|
||||
<string name="help_desc_how_to_add_books_2">Navegar</string>
|
||||
|
|
@ -216,23 +209,18 @@
|
|||
<string name="start_permissions_storage">Permiso de almacenamiento</string>
|
||||
<string name="help_desc_how_to_use_double_click_translation_1">En primer lugar, vaya a los ajustes del lector (ver: ¿Cómo personalizo el lector?), luego encienda el ajuste correspondiente. Después de eso, comienza a leer el libro (ver: ¿Cómo leo un libro?). Ahora si hace doble clic en el párrafo deseado, el traductor externo se abrirá con el texto del párrafo.</string>
|
||||
<string name="start_permissions_storage_desc">Necesario para escanear tu dispositivo y encontrar los libros</string>
|
||||
<string name="help_title_how_to_update_book">¿Cómo actualizo un libro?</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">Ajustes</string>
|
||||
<string name="help_desc_how_to_update_book_2">Biblioteca</string>
|
||||
<string name="help_desc_how_to_update_book_1">Ir al</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Ir al</string>
|
||||
<string name="help_desc_how_to_manage_history_2">Historial</string>
|
||||
<string name="help_title_how_to_manage_history">¿Cómo administro el historial?</string>
|
||||
<string name="help_title_how_to_use_tooltip">¿Cómo utilizo las herramientas?</string>
|
||||
<string name="help_desc_how_to_manage_history_3">Al hacer clic en el botón eliminar a la derecha del elemento del historial, se eliminará. El historial afecta el orden de libros en la Biblioteca, eliminando el historial también reordenará el libro. El último libro abierto es siempre el primero en Biblioteca e Historial.</string>
|
||||
<string name="help_desc_how_to_use_tooltip_1">La mayoría de los botones con íconos tienen información sobre herramientas que pueden ayudarte si no sabes qué hace un botón. Para mostrar la información sobre las herramientas, puedes mantener presionado el botón.</string>
|
||||
<string name="help_desc_how_to_update_book_3">y haz clic en la imagen de la portada del libro para ver los detalles del libro. Desliza hacia abajo la pantalla o haz clic en el icono de la actualización en la esquina superior derecha para actualizar el libro. Si el archivo del libro cambió, puedes confirmar y actualizar el libro o cancelar la actualización.</string>
|
||||
<string name="help_desc_how_to_customize_reader_1">Comienza a leer el libro (consulta: ¿Cómo leo un libro?), luego haz clic en cualquier parte de la pantalla para abrir las barras superior e inferior. Luego, haz clic en el ícono del engranaje en la esquina superior derecha. Esto mostrará todas las configuraciones del lector. La segunda forma es ir a los</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">y selecciona la categoría Lector para personalizar la configuración general, o la categoría Apariencia para personalizar los temas.</string>
|
||||
<string name="today">Hoy</string>
|
||||
<string name="yesterday">Ayer</string>
|
||||
<string name="start_done_desc">Has completado correctamente la configuración básica de la aplicación. ¿Te gustaría aprender a usar la aplicación leyendo la ayuda?</string>
|
||||
<string name="refresh_book_content_desc">Actualizar libro</string>
|
||||
<string name="continue_reading_content_desc">Seguir leyendo</string>
|
||||
<string name="go_back_content_desc">Regresar</string>
|
||||
<string name="cover_image_content_desc">Portada</string>
|
||||
|
|
@ -339,8 +327,6 @@
|
|||
<string name="reading_speed_reader_settings">Velocidad de lectura</string>
|
||||
<string name="perception_expander_option">Ampliador de percepción</string>
|
||||
<string name="perception_expander_option_desc">Aumente su velocidad de lectura centrándose en los principal</string>
|
||||
<string name="update_book">¿Actualizar libro?</string>
|
||||
<string name="update_book_description">Se encontró una actualización del texto del libro. La actualización es necesaria para garantizar que se utilicen los métodos de análisis más recientes. Este es un proceso autónomo y en la mayoría de los casos está asociado con la actualización del analizador de texto. Su progreso no se verá afectado a menos que haya cambios significativos. ¿Quieres continuar con la actualización?</string>
|
||||
<string name="proceed">Proceder</string>
|
||||
<string name="default_string">Por defecto</string>
|
||||
<string name="system_reader_settings">Sistema</string>
|
||||
|
|
@ -348,12 +334,8 @@
|
|||
<string name="screen_orientation_portrait">Vertical</string>
|
||||
<string name="screen_orientation_landscape">Apaisada</string>
|
||||
<string name="screen_orientation_locked_portrait">Bloquear en vertical</string>
|
||||
<string name="update_text_content_desc">Actualizar texto</string>
|
||||
<string name="check_for_text_update_option_desc">Comprobar automáticamente si hay actualización del texto</string>
|
||||
<string name="check_for_text_update_option">Buscar actualizaciones del texto</string>
|
||||
<string name="screen_orientation_option">Orientación de la pantalla</string>
|
||||
<string name="screen_orientation_locked_landscape">Bloqueado en apaisado</string>
|
||||
<string name="check_for_text_update_toast_option">Mostrar mensaje emergente \"El texto está actualizado\"</string>
|
||||
<string name="contributors_option">Colaboradores</string>
|
||||
<string name="help_title_how_to_use_perception_expander">¿Qué es un potenciador de la percepción y cómo utilizarlo?</string>
|
||||
<string name="help_title_how_to_use_perception_expander_1">El expansor de percepción puede ayudarte a leer más rápido. En primer lugar, actívelo en los ajustes del Lector (consulte: ¿Cómo personalizo el Lector?). Una vez activado, aparecerán dos líneas verticales a cada lado del Reader. Para optimizar aún más su velocidad de lectura, ajuste el relleno para crear menos espacio alrededor del centro. Para utilizarlo, concéntrate en el centro de la pantalla y deja que tu visión periférica capte el texto de los lados. Mientras lees, mantén la atención en el centro sin mirar directamente a los lados después de cada línea.</string>
|
||||
|
|
|
|||
|
|
@ -13,13 +13,11 @@
|
|||
<string name="delete_book">Supprimer le livre ?</string>
|
||||
<string name="move_book">Déplacer le livre ?</string>
|
||||
<string name="delete_history">Effacer l\'historique de lecture ?</string>
|
||||
<string name="confirm_update">Confirmer la mise à jour ?</string>
|
||||
<string name="enable_check_for_updates">Activer la vérification des mises à jour ?</string>
|
||||
<string name="add_books_description">Vous pouvez choisir les livres que vous souhaitez ajouter. Vous pouvez modifier le titre et l\'image de couverture du livre par la suite. Le chargement peut prendre plusieurs minutes.</string>
|
||||
<string name="delete_books_description">Cela supprimera tous les livres sélectionnés (%1$s) de la base de données. Ceci ne supprimera pas les livres sélectionnés de votre appareil.</string>
|
||||
<string name="delete_book_description">Cela supprimera ce livre de la base de données. Ceci ne le supprimera pas de votre appareil.</string>
|
||||
<string name="move_book_description">Choisissez la catégorie dans laquelle vous souhaitez déplacer ce livre. Ce dernier sera déplacé vers la catégorie choisie.</string>
|
||||
<string name="confirm_update_description">Met à jour le texte et les chapitres de ce livre. La progression devrait rester inchangée sauf si l\'ordre des paragraphes a été changé.</string>
|
||||
<string name="enable_check_for_updates_description">En activant la fonction “Vérifier les mises à jour”, l\'application récupérera les informations de la dernière version de “api.github.com” à chaque fois que l\'application démarrera. Voulez-vous continuer et activer “Vérifier les mises à jour” ?</string>
|
||||
<string name="error_permission">Nous avons besoin de l\'autorisation de stockage pour scanner votre appareil à la recherche de livres</string>
|
||||
<string name="error_query">"Erreur : %1$s"</string>
|
||||
|
|
@ -47,8 +45,6 @@
|
|||
<string name="copy">Copier</string>
|
||||
<string name="translate">Traduire</string>
|
||||
<string name="dictionary">Dictionnaire</string>
|
||||
<string name="retry">Réessayer</string>
|
||||
<string name="confirm">Confirmer</string>
|
||||
<string name="next">Suivant</string>
|
||||
<string name="yes_go_to_help">Oui, accéder à l\'aide</string>
|
||||
<string name="no">Non</string>
|
||||
|
|
@ -151,8 +147,6 @@
|
|||
<string name="no_updates">La dernière version de l\'application est déjà installée.</string>
|
||||
<string name="cover_reset">L\'image de couverture a été réinitialisée avec succès.</string>
|
||||
<string name="history_element_deleted">Cet élément de l\'historique a été supprimé avec succès.</string>
|
||||
<string name="file_not_found">Fichier \"%1$s\" est introuvable.</string>
|
||||
<string name="book_updated">Le texte du livre a été mis à jour avec succès.</string>
|
||||
<string name="file_path">Chemin du fichier</string>
|
||||
<string name="file_last_opened">Dernier fichier ouvert</string>
|
||||
<string name="file_size">Taille du fichier</string>
|
||||
|
|
@ -189,8 +183,6 @@
|
|||
<string name="help_desc_how_to_customize_reader_1">Commencez à lire le livre (voir : Comment lire un livre ?), puis faites apparaître les barres supérieure et inférieure en cliquant n\'importe où sur l\'écran. Cliquez ensuite sur l\'icône de l\'engrenage dans le coin supérieur droit. Cela affichera tous les paramètres du lecteur. La deuxième méthode consiste à aller dans les</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">Paramètres</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">et sélectionnez la catégorie Lecteur pour personnaliser les paramètres généraux, ou la catégorie Apparence pour personnaliser les paramètres Couleurs.</string>
|
||||
<string name="help_title_how_to_update_book">Comment mettre à jour un livre ?</string>
|
||||
<string name="help_desc_how_to_update_book_3">et cliquez sur l\'image de la couverture du livre pour en voir les détails. Tirez vers le bas ou cliquez sur l\'icône d\'actualisation dans le coin supérieur droit pour mettre à jour le livre. Si le fichier du livre a changé, vous pouvez confirmer et mettre à jour le livre ou annuler la mise à jour.</string>
|
||||
<string name="help_title_how_to_manage_history">Comment gérer l\'historique ?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Allez vers la page de</string>
|
||||
<string name="help_desc_how_to_manage_history_2">L\'historique</string>
|
||||
|
|
@ -212,7 +204,6 @@
|
|||
<string name="start_permissions_notifications_desc">Nécessaire pour vérifier si une nouvelle version de l\'application est disponible</string>
|
||||
<string name="start_done">Tout est prêt!</string>
|
||||
<string name="yesterday">Hier</string>
|
||||
<string name="refresh_book_content_desc">Rafraîchir le livre</string>
|
||||
<string name="continue_reading_content_desc">Poursuivre la lecture</string>
|
||||
<string name="go_back_content_desc">Retourner</string>
|
||||
<string name="cover_image_content_desc">Image de couverture</string>
|
||||
|
|
@ -291,7 +282,6 @@
|
|||
<string name="files_structure_directory">Répertoires</string>
|
||||
<string name="browse_sort_order_file_format">Format de fichier</string>
|
||||
<string name="browse_sort_order_name">Alphabétiquement</string>
|
||||
<string name="nothing_changed">Le texte est à jour.</string>
|
||||
<string name="move_this_book">Déplacer</string>
|
||||
<string name="delete_this_book">Supprimer</string>
|
||||
<string name="details_book">Détails</string>
|
||||
|
|
@ -306,8 +296,6 @@
|
|||
<string name="help_desc_how_to_add_books_3">Si vous ne voyez pas les livres téléchargés, essayez d\'actualiser la liste en tirant vers le bas. Assurez-vous que le format de fichier de votre livre est compatible. Cliquez ensuite sur le livre pour le sélectionner ou maintenez-le pour afficher son emplacement. Après avoir sélectionné tous les livres que vous voulez, cliquez sur l\'icône de la coche dans le coin supérieur droit, attendez que tous les livres soient chargés et cliquez sur « Ajouter ». Vous devriez maintenant voir tous les livres que vous avez ajoutés dans la section</string>
|
||||
<string name="help_desc_how_to_move_or_delete_books_3">Maintenez l\'image de couverture du premier livre enfoncée jusqu\'à ce qu\'elle soit sélectionnée. Il vous suffit ensuite de cliquer sur toutes les images de couverture des livres que vous souhaitez sélectionner. Vous pouvez également sélectionner des livres dans plusieurs catégories. Une fois que vous avez sélectionné tous les livres souhaités, vous pouvez cliquer sur l\'icône de la flèche pour les déplacer et sur l\'icône de la corbeille pour les supprimer.</string>
|
||||
<string name="help_desc_how_to_read_book_3">Pour commencer à lire le livre, cliquez sur le bouton situé dans le coin inférieur droit du livre que vous souhaitez lire. Vous pouvez également commencer à lire le livre en cliquant sur l\'image de la couverture pour voir les détails du livre, puis en cliquant sur le bouton dans le coin inférieur droit. La progression sera sauvegardée et restaurée automatiquement. Vous pouvez faire apparaître les barres supérieure et inférieure en cliquant n\'importe où sur l\'écran. En cliquant sur le titre du livre, vous accéderez aux détails du livre. En cliquant sur l\'icône de l\'engrenage, vous verrez les paramètres du lecteur. Vous pouvez utiliser le curseur de la barre inférieure pour modifier la progression.</string>
|
||||
<string name="help_desc_how_to_update_book_1">Allez vers la</string>
|
||||
<string name="help_desc_how_to_update_book_2">Bibliothèque</string>
|
||||
<string name="help_desc_how_to_manage_history_3">En cliquant sur le bouton de suppression à droite de l\'élément historique, celui-ci sera supprimé. L\'historique affecte l\'ordre des livres dans la librairie. En supprimant un élément de l\'historique, l\'ordre des livres sera également modifié. Le dernier livre ouvert est toujours le premier dans la librairie et dans l\'historique.</string>
|
||||
<string name="help_desc_how_to_use_double_click_translation_1">Tout d\'abord, allez dans les paramètres du lecteur(voir: Comment personnaliser le lecteur?), puis activez les réglages correspondants. Ensuite, commencez à lire le livre(voir: Comment lire un livre?). Maintenant, si vous double-cliquez sur le paragraphe souhaité, le traducteur externe s\'ouvrira avec le texte du paragraphe.</string>
|
||||
<string name="help_desc_how_to_create_color_presets_1">Allez dans les paramètres d\'apparence(voir: Comment personnaliser le lecteur?). Vous pouvez modifier les paramètres de tous les préréglages de couleur dans la boîte située sous «Préréglage de couleur» dans la sous-catégorie «Couleurs». Pour créer un nouveau préréglage de couleur, cliquez sur l\'icône-bouton «Ajouter». Il y a plusieurs façons de modifier un préréglage de couleur: en cliquant sur le champ de texte, vous pouvez changer le nom du préréglage de couleur, en déplaçant les curseurs, vous pouvez changer les couleurs du préréglage de couleur, en cliquant sur l\'icône «Mélanger», vous pouvez mélanger toutes les couleurs. Si vous souhaitez supprimer un préréglage de couleur, cliquez sur l\'icône «Supprimer».</string>
|
||||
|
|
@ -334,23 +322,17 @@
|
|||
<string name="hide_bars_on_fast_scroll_option">Cacher les barres en cas de défilement rapide</string>
|
||||
<string name="checkpoint_back_content_desc">Retour au point de contrôle</string>
|
||||
<string name="default_string">Défaut</string>
|
||||
<string name="update_book">Mettre à jour le livre ?</string>
|
||||
<string name="proceed">Continuer</string>
|
||||
<string name="reading_speed_reader_settings">Vitesse de lecture</string>
|
||||
<string name="perception_expander_option">Expansion de la perception</string>
|
||||
<string name="perception_expander_option_desc">Augmentez votre vitesse de lecture en vous concentrant sur le centre</string>
|
||||
<string name="perception_expander_thickness_option">Épaisseur du trait de l\'extenseur de perception</string>
|
||||
<string name="check_for_text_update_toast_option">Afficher la notification toast “le texte est à jour”</string>
|
||||
<string name="screen_orientation_option">Orientation de l\'écran</string>
|
||||
<string name="screen_orientation_locked_portrait">Portrait verrouillé</string>
|
||||
<string name="contributors_option">Contributeurs</string>
|
||||
<string name="help_title_how_to_use_perception_expander">Qu\'est-ce que l\'expandeur de perception et comment l\'utiliser?</string>
|
||||
<string name="chapters_content_desc">Chapitres</string>
|
||||
<string name="update_text_content_desc">Mettre à jour le texte</string>
|
||||
<string name="update_book_description">Une mise à jour du texte a été trouvée. La mise à jour est nécessaire pour s\'assurer que les dernières méthodes d\'analyse sont utilisées. Il s\'agit d\'un processus hors ligne. Votre progression ne sera pas affectée, à moins que des changements importants ne surviennent. Voulez-vous procéder à la mise à jour ?</string>
|
||||
<string name="system_reader_settings">Système</string>
|
||||
<string name="check_for_text_update_option">Vérifier si le texte est actualisé</string>
|
||||
<string name="check_for_text_update_option_desc">Vérifie automatiquement s\'il y a une mise à jour du texte</string>
|
||||
<string name="screen_orientation_free">Libre</string>
|
||||
<string name="screen_orientation_landscape">Paysage</string>
|
||||
<string name="screen_orientation_portrait">Portrait</string>
|
||||
|
|
|
|||
|
|
@ -13,11 +13,8 @@
|
|||
<string name="add_books">किताबें शामिल करें ?</string>
|
||||
<string name="move_books">किताबें स्थानांतरित करें?</string>
|
||||
<string name="delete_book">किताब हटाएं?</string>
|
||||
<string name="confirm_update">अपडेट करें?</string>
|
||||
<string name="enable_check_for_updates">अपडेट्स की जाँच चालू करें?</string>
|
||||
<string name="update_book">किताब अपडेट करें?</string>
|
||||
<string name="move_books_description">वह श्रेणी चुनें जिसमें आप सभी चयनित पुस्तकों को ले जाना चाहते हैं(%1$s)। सभी चयनित पुस्तकें चयनित श्रेणी में ले जाई जाएँगी।</string>
|
||||
<string name="confirm_update_description">इस पुस्तक के पाठ और अध्यायों को अपडेट करें। जब तक पैराग्राफ़ों का क्रम नहीं बदला जाता, तब तक प्रगति अपरिवर्तित रहनी चाहिए।</string>
|
||||
<string name="update_app_description">नया ऐप वर्शन मिला। क्या आप आगे बढ़ना चाहते हैं और रिलीज़ पेज पर जाना चाहते हैं?</string>
|
||||
<string name="error_something_went_wrong">कुछ गड़बड़ हुआ है ।</string>
|
||||
<string name="error_wrong_file_format">ग़लत प्रकार का फाइल ।</string>
|
||||
|
|
@ -43,8 +40,6 @@
|
|||
<string name="copy">कॉपी करें</string>
|
||||
<string name="translate">अनुवाद करें</string>
|
||||
<string name="dictionary">शब्दकोष</string>
|
||||
<string name="retry">पुन: प्रयास करें</string>
|
||||
<string name="confirm">पुष्टि करें</string>
|
||||
<string name="next">अगला</string>
|
||||
<string name="yes_go_to_help">हां, सहायता पर जाएं</string>
|
||||
<string name="no">नहीं</string>
|
||||
|
|
@ -105,7 +100,6 @@
|
|||
<string name="delete_history_description">यह डेटाबेस से पूरा इतिहास मिटा देगा। पूरा इतिहास मिटाने के बाद, किताबों का क्रम फिर से सेट हो जाएगा।</string>
|
||||
<string name="error_permission">हमें किताबों के लिए आपके डिवाइस को स्कैन करने के लिए भंडारण अनुमति की आवश्यकता है</string>
|
||||
<string name="enable_check_for_updates_description">«अपडेट की जाँच करें» को सक्षम करके, ऐप हर बार ऐप शुरू होने पर «api.github.com» से नवीनतम रिलीज़ जानकारी प्राप्त करेगा। क्या आप आगे बढ़ना चाहते हैं और «अपडेट की जाँच करें» को सक्षम करना चाहते हैं?</string>
|
||||
<string name="update_book_description">टेक्स्ट का अपडेट मिल गया है. नवीनतम पार्सर विधियों का उपयोग सुनिश्चित करने के लिए अद्यतन की आवश्यकता है। यह ऑफ़लाइन प्रक्रिया है। जब तक बड़े परिवर्तन नहीं होते, तब तक आपकी प्रगति प्रभावित नहीं होगी। क्या आप अपडेट जारी रखना चाहते हैं?</string>
|
||||
<string name="error_no_description">कोई वर्णन नहीं।</string>
|
||||
<string name="error_something_went_wrong_with_file">कुछ गड़बड़ हो गई है। कृपया जाँचें कि इस पुस्तक की फ़ाइल दूषित तो नहीं है।</string>
|
||||
<string name="error_file_empty">यह फ़ाइल खाली या दूषित है।</string>
|
||||
|
|
@ -148,9 +142,6 @@
|
|||
<string name="perception_expander_option">धारणा विस्तारक</string>
|
||||
<string name="perception_expander_option_desc">केंद्र पर ध्यान केंद्रित करके अपनी पढ़ने की गति बढ़ाएँ</string>
|
||||
<string name="perception_expander_padding_option">धारणा विस्तारक लाइन पैडिंग</string>
|
||||
<string name="check_for_text_update_option">टेक्स्ट अपडेट की जांच करें</string>
|
||||
<string name="check_for_text_update_option_desc">स्वचालित रूप से जांचें कि टेक्स्ट अपडेट है या नहीं</string>
|
||||
<string name="check_for_text_update_toast_option">\"टेक्स्ट अप-टू-डेट है\" टोस्ट दिखाएं</string>
|
||||
<string name="browse_files_structure_option">फ़ाइल संरचना</string>
|
||||
<string name="browse_layout_option">प्रदर्शन मोड</string>
|
||||
<string name="browse_grid_size_option">ग्रिड का आकार</string>
|
||||
|
|
@ -225,8 +216,6 @@
|
|||
<string name="red_color">लाल</string>
|
||||
<string name="no_updates">ऐप का नवीनतम संस्करण पहले से इंस्टॉल है।</string>
|
||||
<string name="cover_reset">कवर छवि सफलतापूर्वक रीसेट कर दी गई।</string>
|
||||
<string name="file_not_found">फ़ाइल \"%1$s\" नहीं मिली।</string>
|
||||
<string name="book_updated">पुस्तक का पाठ सफलतापूर्वक अद्यतन किया गया।</string>
|
||||
<string name="move_this_book">कदम</string>
|
||||
<string name="delete_this_book">मिटाना</string>
|
||||
<string name="details_book">विवरण</string>
|
||||
|
|
@ -257,7 +246,6 @@
|
|||
<string name="help_desc_how_to_add_books_2">ब्राउज़</string>
|
||||
<string name="help_desc_how_to_add_books_4">पुस्तकालय</string>
|
||||
<string name="history_element_deleted">इतिहास तत्व सफलतापूर्वक हटा दिया गया।</string>
|
||||
<string name="nothing_changed">पाठ अद्यतित है।</string>
|
||||
<string name="file_name">फ़ाइल का नाम</string>
|
||||
<string name="unknown">अज्ञात</string>
|
||||
<string name="internal_storage">आंतरिक स्टोरेज</string>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
<string name="translate">Traduci</string>
|
||||
<string name="grant_permission">Concedi permesso</string>
|
||||
<string name="add">Aggiungi</string>
|
||||
<string name="update_book">Aggiornare libro?</string>
|
||||
<string name="browse_settings">Esplora</string>
|
||||
<string name="proceed">Procedi</string>
|
||||
<string name="read_keep">Continua così!</string>
|
||||
|
|
@ -30,7 +29,6 @@
|
|||
<string name="report_bug_option">Segnala un errore</string>
|
||||
<string name="chapters_content_desc">Capitoli</string>
|
||||
<string name="help_desc_how_to_edit_book_2">Libreria</string>
|
||||
<string name="refresh_book_content_desc">Aggiorna libro</string>
|
||||
<string name="cover_image_content_desc">Copertina</string>
|
||||
<string name="browse_content_desc">Aggiungi libri</string>
|
||||
<string name="open_reader_settings_content_desc">Impostazioni lettore</string>
|
||||
|
|
@ -56,7 +54,6 @@
|
|||
<string name="enable">Abilita</string>
|
||||
<string name="web_search">Ricerca web</string>
|
||||
<string name="dark_theme_on">Abilitato</string>
|
||||
<string name="confirm">Conferma</string>
|
||||
<string name="start_permissions_notifications">Permesso per le notifiche</string>
|
||||
<string name="credits_icon">Icone</string>
|
||||
<string name="theme_appearance_settings">Preferenze tema</string>
|
||||
|
|
@ -82,14 +79,12 @@
|
|||
<string name="storage_permission_description">Abbiamo bisogno del permesso di archiviazione per la scansione del Tuo Dispositivo per i libri. Senza questo permesso, non sarai in grado di aggiungere i libri.</string>
|
||||
<string name="error_something_went_wrong_with_file">Qualcosa è andato storto. Per favore controllare che il file di questo libro non sia danneggiato.</string>
|
||||
<string name="done">Fatto</string>
|
||||
<string name="retry">Riprova</string>
|
||||
<string name="share">Condividi</string>
|
||||
<string name="yes_go_to_help">Sì, vai ad Aiuto</string>
|
||||
<string name="no">No</string>
|
||||
<string name="delete_color_preset_content_desc">Elimina preset di colori</string>
|
||||
<string name="files_structure_directory">Cartelle</string>
|
||||
<string name="pure_dark_on">Abilitato</string>
|
||||
<string name="confirm_update">Conferma aggiornamento?</string>
|
||||
<string name="help_screen">Aiuto</string>
|
||||
<string name="error_content_desc">Errore</string>
|
||||
<string name="reader_settings_desc">Carattere, testo, traduttore</string>
|
||||
|
|
@ -117,7 +112,6 @@
|
|||
<string name="books_added">Tutti i libri selezionati sono stati aggiunti correttamente.</string>
|
||||
<string name="delete_book_description">Eliminerà questo libro dal database. Non eliminerà questo libro dal tuo dispositivo.</string>
|
||||
<string name="add_books_description">Puoi scegliere quali libri vuoi aggiungere. È possibile modificare il titolo e l\'immagine di copertina in seguito. Il processo di caricamento può richiedere fino a diversi minuti.</string>
|
||||
<string name="confirm_update_description">Aggiorna il testo e i capitoli di questo libro. I progressi dovrebbero rimanere invariati a meno che l\'ordine dei paragrafi non sia stato modificato.</string>
|
||||
<string name="delete_history_description">Elimina l\'intera cronologia dal database. Dopo avere eliminato la cronologia, l\'ordine dei libri sarà reimpostato.</string>
|
||||
<string name="delete_books_description">Eliminerà tutti i libri selezionati (%1$s) dal database. Non eliminerà i libri selezionati dal tuo dispositivo.</string>
|
||||
<string name="update_app_description">Nuova versione dell\'app trovata. Vuoi procedere alla pagina di rilascio?</string>
|
||||
|
|
@ -215,7 +209,6 @@
|
|||
<string name="search_field_empty">Cerca…</string>
|
||||
<string name="color_preset_selected_query">Selezionato «%1$s»</string>
|
||||
<string name="translator_reader_settings">Traduttore</string>
|
||||
<string name="update_book_description">È stato trovato un aggiornamento del testo. L\'aggiornamento è necessario per garantire che vengano utilizzati i metodi parser più recenti. È un processo offline. I tuoi progressi non saranno influenzati a meno che non si verifichino grandi cambiamenti. Vuoi procedere con l\'aggiornamento?</string>
|
||||
<string name="selected_items_count_query">%1$s selezionato</string>
|
||||
<string name="custom_screen_brightness_option">Luminosità personalizzata</string>
|
||||
<string name="screen_brightness_option">Luminosità</string>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
<string name="undo">Cofnij</string>
|
||||
<string name="copy">Kopiuj</string>
|
||||
<string name="dictionary">Słownik</string>
|
||||
<string name="retry">Spróbuj ponownie</string>
|
||||
<string name="confirm">Potwierdź</string>
|
||||
<string name="next">Dalej</string>
|
||||
<string name="no">Nie</string>
|
||||
<string name="done">Gotowe</string>
|
||||
|
|
@ -71,7 +69,6 @@
|
|||
<string name="delete_book">Usunąć książkę?</string>
|
||||
<string name="move_book">Przenieść książkę?</string>
|
||||
<string name="delete_history">Usunąć historię czytania?</string>
|
||||
<string name="confirm_update">Potwierdzić aktualizację?</string>
|
||||
<string name="move_books_description">Wybierz kategorię, do której chcesz przenieść wszystkie wybrane książki (%1$s). Wszystkie wybrane książki zostaną przeniesione do wybranej kategorii.</string>
|
||||
<string name="delete_book_description">To spowoduje usunięcie tej książki z bazy danych, ale nie usunie jej z twojego urządzenia.</string>
|
||||
<string name="delete_history_description">To spowoduje usuniecie całej historii z bazy danych. Po usunięciu całej historii kolejność książek zostanie zresetowana.</string>
|
||||
|
|
@ -204,7 +201,6 @@
|
|||
<string name="continue_reading_content_desc">Kontynuuj czytanie</string>
|
||||
<string name="github_profile_content_desc">Profil GitHub</string>
|
||||
<string name="move_this_book">Przenieś</string>
|
||||
<string name="nothing_changed">Tekst książki jest aktualny.</string>
|
||||
<string name="help_desc_how_to_customize_reader_1">Zacznij czytać książkę (patrz: Jak mogę przeczytać książkę?), A następnie przynieś górne i dolne paski, klikając w dowolnym miejscu na ekranie. Następnie kliknij ikonę zębatki w prawym górnym rogu. Spowoduje to wyświetlenie wszystkich ustawień Czytnika. Drugim sposobem jest przejście do</string>
|
||||
<string name="color_preset_placeholder">Nazwij ustawienie…</string>
|
||||
<string name="browse_grid_size_option">Rozmiar siatki</string>
|
||||
|
|
@ -222,8 +218,6 @@
|
|||
<string name="no_updates">Najnowsza wersja aplikacji jest już zainstalowana.</string>
|
||||
<string name="cover_reset">Obraz okładki został pomyślnie zresetowany.</string>
|
||||
<string name="history_element_deleted">Element historii został pomyślnie usunięty.</string>
|
||||
<string name="file_not_found">Plik „%1$s” nie został znaleziony.</string>
|
||||
<string name="book_updated">Tekst książki został pomyślnie zaktualizowany.</string>
|
||||
<string name="file_last_opened">Plik ostatnio otwarty</string>
|
||||
<string name="file_size">Rozmiar pliku</string>
|
||||
<string name="unknown">Nieznany</string>
|
||||
|
|
@ -238,7 +232,6 @@
|
|||
<string name="credits_translation">Tłumaczenie</string>
|
||||
<string name="credits_ideas">Pomysły</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">i wybierz kategorię Czytnik, aby dostosować ustawienia ogólne lub kategorię Wygląd, aby dostosować ustawienia kolorów.</string>
|
||||
<string name="help_desc_how_to_update_book_2">Biblioteka</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Idź do</string>
|
||||
<string name="help_desc_how_to_manage_history_2">Historia</string>
|
||||
<string name="help_desc_how_to_manage_history_3">Klikając przycisk usuwania po prawej stronie elementu historii, zostanie on usunięty. Historia wpływa na porządek książek w Bibliotece, usuwając element historii, zmieni również kolejność książki. Ostatnio otwarta książka jest zawsze pierwsza w bibliotece i historii.</string>
|
||||
|
|
@ -271,7 +264,6 @@
|
|||
<string name="start_permissions_preferences">Uprawnienia</string>
|
||||
<string name="start_permissions_granted">Przyznane</string>
|
||||
<string name="start_done_desc">Pomyślnie wykonałeś podstawowe ustawienie aplikacji. Czy chcesz dowiedzieć się, jak korzystać z aplikacji, czytając Pomoc?</string>
|
||||
<string name="refresh_book_content_desc">Odśwież książkę</string>
|
||||
<string name="file_icon_content_desc">Plik</string>
|
||||
<string name="apply_changes_content_desc">Zastosuj zmiany</string>
|
||||
<string name="select_all_files_content_desc">Wybierz wszystkie pliki</string>
|
||||
|
|
@ -289,7 +281,6 @@
|
|||
<string name="history_content_desc">Historia czytania</string>
|
||||
<string name="delete_this_book">Usuń</string>
|
||||
<string name="exit_search_content_desc">Opuść wyszukiwanie</string>
|
||||
<string name="confirm_update_description">Kliknięcie przycisku potwierdź spowoduje, że tekst tej książki zostanie zaktualizowany. Zapamiętaj, w którym miejscu przestałeś czytać przed aktualizacją tekstu.</string>
|
||||
<string name="books_moved">Wszystkie wybrane książki zostały pomyślnie przeniesione.</string>
|
||||
<string name="delete_whole_history_content_desc">Usuń całą historię</string>
|
||||
<string name="help_desc_how_to_add_books_2">Przeglądaj</string>
|
||||
|
|
@ -298,8 +289,6 @@
|
|||
<string name="help_desc_how_to_customize_app_1">Idź do</string>
|
||||
<string name="help_desc_how_to_customize_app_2">Ustawienia</string>
|
||||
<string name="help_desc_how_to_read_book_2">Biblioteka</string>
|
||||
<string name="help_desc_how_to_update_book_1">Idź do</string>
|
||||
<string name="help_desc_how_to_update_book_3">i kliknij obraz okładki książki, aby zobaczyć szczegóły książki. Przeciągnij w dół ekran lub kliknij ikonę odświeżania w prawym górnym rogu, aby zaktualizować książkę. Jeśli plik książki ulegnie zmianie, możesz potwierdzić i zaktualizować książkę lub anulować aktualizację.</string>
|
||||
<string name="help_title_how_to_manage_history">Jak mogę zarządzać historią?</string>
|
||||
<string name="help_title_how_to_use_color_presets">Jak mogę korzystać z ustawień kolorów?</string>
|
||||
<string name="start_welcome_desc">Do świata, w którym słowa oczarowują, uczą i prowadzą niesamowite przygody! Ustawmy kilka rzeczy!</string>
|
||||
|
|
@ -313,7 +302,6 @@
|
|||
<string name="whats_new_option">Co nowego</string>
|
||||
<string name="licenses_option">Licencje open source</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">Ustawienia</string>
|
||||
<string name="help_title_how_to_update_book">Jak mogę zaktualizować książkę?</string>
|
||||
<string name="directory_icon_content_desc">Katalog</string>
|
||||
<string name="error_content_desc">Błąd</string>
|
||||
<string name="search_content_desc">Szukaj</string>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
<string name="move_book">Mover livro?</string>
|
||||
<string name="delete_book">Apagar livro?</string>
|
||||
<string name="default_string">Padrão</string>
|
||||
<string name="confirm_update">Confirmar atualização?</string>
|
||||
<string name="enable_check_for_updates">Habilitar verificação de atualizações?</string>
|
||||
<string name="cancel">Cancelar</string>
|
||||
<string name="add">Adicionar</string>
|
||||
|
|
@ -38,8 +37,6 @@
|
|||
<string name="copy">Copiar</string>
|
||||
<string name="translate">Traduzir</string>
|
||||
<string name="dictionary">Dicionário</string>
|
||||
<string name="retry">Tentar novamente</string>
|
||||
<string name="confirm">Confirmar</string>
|
||||
<string name="next">Próximo</string>
|
||||
<string name="share">Compartilhar</string>
|
||||
<string name="unknown_author">Desconhecido</string>
|
||||
|
|
@ -62,7 +59,6 @@
|
|||
<string name="updates_notification_desc">A atualização %1$s acabou de lançar! Clique para ir à página de lançamento.</string>
|
||||
<string name="updates_notification_title">Novo update do Book\'s Story!</string>
|
||||
<string name="add_books">Adicionar livros?</string>
|
||||
<string name="update_book">Atualizar livro?</string>
|
||||
<string name="storage_permission_description">Precisamos de permissão de acesso ao armazenamento para procurar livros no seu dispositivo. Sem essa permissão, você não será capaz de adicionar um livro.</string>
|
||||
<string name="start">Começar</string>
|
||||
<string name="delete">Apagar</string>
|
||||
|
|
@ -119,7 +115,6 @@
|
|||
<string name="error_content_desc">Erro</string>
|
||||
<string name="search_content_desc">Pesquisar</string>
|
||||
<string name="start_permissions_preferences">Permissões</string>
|
||||
<string name="help_desc_how_to_update_book_2">Biblioteca</string>
|
||||
<string name="copied">Copiado</string>
|
||||
<string name="required_content_desc">Requerido</string>
|
||||
<string name="text_alignment_justify">Justificar</string>
|
||||
|
|
@ -148,7 +143,6 @@
|
|||
<string name="dark_theme_option">Tema escuro</string>
|
||||
<string name="move_book_description">Escolha a categoria para qual você quer mover este livro. Esse livro será movido para tal categoria.</string>
|
||||
<string name="delete_history_description">Isto irá deletar todo o histórico da base de dados. Após deletá-lo, a ordem dos livros será restaurada.</string>
|
||||
<string name="confirm_update_description">Atualizar os capítulos e o texto deste livro. O progresso deve se manter, a não ser que a ordem dos parágrafos mudaram.</string>
|
||||
<string name="paragraph_indentation_option">Recuo de parágrafo</string>
|
||||
<string name="letter_spacing_option">Espaçamento das letras</string>
|
||||
<string name="file_name">Nome do arquivo</string>
|
||||
|
|
@ -215,7 +209,6 @@
|
|||
<string name="help_translate_option">Ajude a traduzir</string>
|
||||
<string name="start_permissions_notifications">Permissão de notificações</string>
|
||||
<string name="start_done">Está tudo feito!</string>
|
||||
<string name="refresh_book_content_desc">Atualizar livro</string>
|
||||
<string name="cover_image_content_desc">Imagem da capa</string>
|
||||
<string name="open_reader_settings_content_desc">Configurações do leitor</string>
|
||||
<string name="favorite_directory_content_desc">Diretório favorito</string>
|
||||
|
|
@ -238,7 +231,6 @@
|
|||
<string name="browse_settings_desc">Geral, filtro, ordem</string>
|
||||
<string name="check_for_updates_option">Procurar atualizações</string>
|
||||
<string name="keep_screen_on_option">Manter a tela ligada</string>
|
||||
<string name="nothing_changed">O texto está atualizado.</string>
|
||||
<string name="apply_changes_content_desc">Aplicar alterações</string>
|
||||
<string name="add_files_content_desc">Adicionar arquivos</string>
|
||||
<string name="library_content_desc">Sua biblioteca</string>
|
||||
|
|
@ -246,7 +238,6 @@
|
|||
<string name="browse_content_desc">Adicionar livros</string>
|
||||
<string name="no_chapters">Sem capítulos</string>
|
||||
<string name="reading_speed_reader_settings">Velocidade de leitura</string>
|
||||
<string name="update_text_content_desc">Atualizar texto</string>
|
||||
<string name="screen_orientation_locked_portrait">Vertical travado</string>
|
||||
<string name="screen_orientation_locked_landscape">Horizontal travado</string>
|
||||
<string name="custom_screen_brightness_option">Iluminação customizada</string>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<string name="history_screen">வரலாறு</string>
|
||||
<string name="add_books">புத்தகங்களைச் சேர்க்கவா?</string>
|
||||
<string name="enable_check_for_updates">புதுப்பிப்புகளை சரிபார்க்கவா?</string>
|
||||
<string name="update_book">புதுப்பிப்பு புத்தகம்?</string>
|
||||
<string name="move_book_description">இந்த புத்தகத்தை நீங்கள் நகர்த்த விரும்பும் வகையைத் தேர்வுசெய்க. இந்த நூல் தேர்ந்தெடுக்கப்பட்ட வகைக்கு மாற்றப்படும்.</string>
|
||||
<string name="update_app_description">புதிய பயன்பாட்டு பதிப்பு கண்டறியப்பட்டது. நீங்கள் தொடர விரும்புகிறீர்களா?</string>
|
||||
<string name="error_something_went_wrong">ஏதோ தவறு நடந்தது.</string>
|
||||
|
|
@ -25,14 +24,12 @@
|
|||
<string name="grant_permission">இசைவு வழங்கவும்</string>
|
||||
<string name="get_help">எனக்கு உதவி தேவை</string>
|
||||
<string name="delete">நீக்கு</string>
|
||||
<string name="confirm">உறுதிப்படுத்தவும்</string>
|
||||
<string name="next">அடுத்தது</string>
|
||||
<string name="yes_go_to_help">ஆம், உதவிக்குச் செல்லுங்கள்</string>
|
||||
<string name="no">இல்லை</string>
|
||||
<string name="done">முடிந்தது</string>
|
||||
<string name="enable">இயக்கு</string>
|
||||
<string name="dictionary">அகராதி</string>
|
||||
<string name="retry">மீண்டும் முயற்சிக்கவும்</string>
|
||||
<string name="proceed">தொடரவும்</string>
|
||||
<string name="read_keep">அதை வைத்திருங்கள்!</string>
|
||||
<string name="general_settings_desc">பயன்பாட்டு மொழி</string>
|
||||
|
|
@ -57,9 +54,6 @@
|
|||
<string name="book_deleted">இந்த நூல் வெற்றிகரமாக நீக்கப்பட்டது.</string>
|
||||
<string name="book_moved">இந்த நூல் வெற்றிகரமாக நகர்த்தப்பட்டது.</string>
|
||||
<string name="copied">நகலெடுக்கப்பட்டது</string>
|
||||
<string name="file_not_found">\"%1$s\" கோப்பு காணப்படவில்லை.</string>
|
||||
<string name="book_updated">புத்தகத்தின் உரை வெற்றிகரமாக புதுப்பிக்கப்பட்டது.</string>
|
||||
<string name="nothing_changed">உரை புதுப்பித்த நிலையில் உள்ளது.</string>
|
||||
<string name="move_this_book">நகர்த்தவும்</string>
|
||||
<string name="history_element_deleted">வரலாற்று உறுப்பு வெற்றிகரமாக நீக்கப்பட்டது.</string>
|
||||
<string name="credits_translation">மொழிபெயர்ப்பு</string>
|
||||
|
|
@ -69,7 +63,6 @@
|
|||
<string name="help_desc_how_to_customize_app_2">அமைப்புகள்</string>
|
||||
<string name="help_desc_how_to_edit_book_1">செல்லுங்கள்</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">அமைப்புகள்</string>
|
||||
<string name="help_title_how_to_update_book">ஒரு புத்தகத்தை எவ்வாறு புதுப்பிப்பது?</string>
|
||||
<string name="help_title_how_to_use_color_presets">வண்ண முன்னமைவுகளை நான் எவ்வாறு பயன்படுத்துவது?</string>
|
||||
<string name="start_welcome">புத்தகத்தின் கதைக்கு வருக!</string>
|
||||
<string name="go_back_content_desc">திரும்பிச் செல்லுங்கள்</string>
|
||||
|
|
@ -170,7 +163,6 @@
|
|||
<string name="fullscreen_option_desc">கணினி பட்டிகளை மறைத்து, திணிப்பை அகற்றவும்</string>
|
||||
<string name="keep_screen_on_option">திரையை தொடர்ந்து வைத்திருங்கள்</string>
|
||||
<string name="perception_expander_thickness_option">புலனுணர்வு விரிவாக்க வரி தடிமன்</string>
|
||||
<string name="check_for_text_update_option">உரை புதுப்பிப்புக்கு சரிபார்க்கவும்</string>
|
||||
<string name="browse_layout_list">பட்டியல்</string>
|
||||
<string name="browse_layout_grid">வலைவாய்</string>
|
||||
<string name="browse_grid_size_auto">தானி</string>
|
||||
|
|
@ -200,7 +192,6 @@
|
|||
<string name="checkpoint_back_content_desc">சோதனைச் சாவடி மீண்டும்</string>
|
||||
<string name="checkpoint_forward_content_desc">சோதனைச் சாவடி முன்னோக்கி</string>
|
||||
<string name="chapters_content_desc">பாடங்கள்</string>
|
||||
<string name="update_text_content_desc">உரையைப் புதுப்பிக்கவும்</string>
|
||||
<string name="more_content_desc">மேலும்</string>
|
||||
<string name="search_field_empty">தேடுங்கள்…</string>
|
||||
<string name="custom_screen_brightness_option">தனிப்பயன் ஒளி</string>
|
||||
|
|
@ -218,15 +209,12 @@
|
|||
<string name="delete_books">புத்தகங்களை நீக்கவா?</string>
|
||||
<string name="delete_book">புத்தகத்தை நீக்கவா?</string>
|
||||
<string name="move_book">புத்தகத்தை நகர்த்தவா?</string>
|
||||
<string name="confirm_update">புதுப்பிப்பை உறுதிப்படுத்தவா?</string>
|
||||
<string name="storage_permission_description">புத்தகங்களுக்காக உங்கள் சாதனத்தை ச்கேன் செய்ய எங்களுக்கு சேமிப்பக இசைவு தேவை. இந்த அனுமதியின்றி, நீங்கள் ஒரு புத்தகத்தைச் சேர்க்க முடியாது.</string>
|
||||
<string name="add_books_description">நீங்கள் எந்த புத்தகங்களைச் சேர்க்க விரும்புகிறீர்கள் என்பதை நீங்கள் தேர்வு செய்யலாம். புத்தகத்தின் தலைப்பு மற்றும் படத்தை பின்னர் திருத்தலாம். ஏற்றுதல் செயல்முறை பல நிமிடங்கள் வரை ஆகலாம்.</string>
|
||||
<string name="move_books_description">தேர்ந்தெடுக்கப்பட்ட அனைத்து புத்தகங்களையும் (%1$s) நகர்த்த விரும்பும் வகையைத் தேர்வுசெய்க. தேர்ந்தெடுக்கப்பட்ட அனைத்து புத்தகங்களும் தேர்ந்தெடுக்கப்பட்ட வகைக்கு மாற்றப்படும்.</string>
|
||||
<string name="delete_books_description">இது தரவுத்தளத்திலிருந்து தேர்ந்தெடுக்கப்பட்ட அனைத்து புத்தகங்களையும் (%1$s) நீக்கிவிடும். இது உங்கள் சாதனத்திலிருந்து தேர்ந்தெடுக்கப்பட்ட புத்தகங்களை நீக்காது.</string>
|
||||
<string name="delete_history_description">இது முழு வரலாற்றையும் தரவுத்தளத்திலிருந்து நீக்குகிறது. முழு வரலாற்றையும் நீக்கிய பிறகு, புத்தகங்களின் வரிசை மீட்டமைக்கப்படும்.</string>
|
||||
<string name="delete_book_description">இது இந்த புத்தகத்தை தரவுத்தளத்திலிருந்து நீக்கிவிடும். இது உங்கள் சாதனத்திலிருந்து இந்த புத்தகத்தை நீக்காது.</string>
|
||||
<string name="confirm_update_description">இந்த புத்தகத்தின் உரை மற்றும் அத்தியாயங்களைப் புதுப்பிக்கவும். பத்திகளின் வரிசை மாற்றப்படாவிட்டால் முன்னேற்றம் மாறாமல் இருக்க வேண்டும்.</string>
|
||||
<string name="update_book_description">உரையின் புதுப்பிப்பு கண்டறியப்பட்டுள்ளது. அண்மைக் கால பாகுபடுத்தி முறைகள் பயன்படுத்தப்படுவதை உறுதிப்படுத்த புதுப்பிப்பு தேவை. இது இணைப்பில்லாத செயல்முறை. பெரிய மாற்றங்கள் ஏற்படாவிட்டால் உங்கள் முன்னேற்றம் பாதிக்கப்படாது. புதுப்பிப்புடன் தொடர விரும்புகிறீர்களா?</string>
|
||||
<string name="error_no_translator">மொழிபெயர்ப்பாளர் பயன்பாடு எதுவும் கிடைக்கவில்லை.</string>
|
||||
<string name="error_no_share_app">பகிர்வதற்கு பயன்பாடு இல்லை.</string>
|
||||
<string name="error_no_text">புத்தக உள்ளடக்கம் காலியாக உள்ளது. தயவுசெய்து, புத்தக உள்ளடக்கம் காலியாக இல்லை என்பதை உறுதிப்படுத்திக் கொள்ளுங்கள்.</string>
|
||||
|
|
@ -261,8 +249,6 @@
|
|||
<string name="text_alignment_option">உரை சீரமைப்பு</string>
|
||||
<string name="fast_color_preset_change_option_desc">வண்ண முன்னமைவை மாற்ற மேல் பட்டியை இடது அல்லது வலதுபுறமாக ச்வைப் செய்யவும்</string>
|
||||
<string name="letter_spacing_option">கடிதம் இடைவெளி</string>
|
||||
<string name="check_for_text_update_option_desc">உரை புதுப்பிப்பு இருக்கிறதா என்று தானாகவே சரிபார்க்கவும்</string>
|
||||
<string name="check_for_text_update_toast_option">\"உரை புதுப்பித்த\" சிற்றுண்டி காட்டுங்கள்</string>
|
||||
<string name="screen_orientation_option">திரை நோக்குநிலை</string>
|
||||
<string name="browse_files_structure_option">கோப்புகள் அமைப்பு</string>
|
||||
<string name="browse_grid_size_option">கட்டம் அளவு</string>
|
||||
|
|
@ -334,9 +320,6 @@
|
|||
<string name="help_desc_how_to_customize_reader_1">புத்தகத்தைப் படிக்கத் தொடங்குங்கள் (பார்க்க: நான் ஒரு புத்தகத்தை எவ்வாறு படிப்பது?), அதன் பிறகு திரையில் எங்கும் சொடுக்கு செய்வதன் மூலம் மேல் மற்றும் கீழ் பட்டிகளைக் கொண்டு வாருங்கள். பின்னர் மேல் வலது மூலையில் உள்ள கியர் ஐகானைக் சொடுக்கு செய்க. இது அனைத்து வாசகர் அமைப்புகளையும் காண்பிக்கும். இரண்டாவது வழி செல்ல வேண்டும்</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">வண்ண அமைப்புகளைத் தனிப்பயனாக்க பொது அமைப்புகளைத் தனிப்பயனாக்க வாசகர் வகையைத் தேர்ந்தெடுக்கவும் அல்லது தோற்ற வகை.</string>
|
||||
<string name="help_title_how_to_use_tooltip">உதவிக்குறிப்புகளை நான் எவ்வாறு பயன்படுத்துவது?</string>
|
||||
<string name="help_desc_how_to_update_book_1">செல்லுங்கள்</string>
|
||||
<string name="help_desc_how_to_update_book_2">நூலகம்</string>
|
||||
<string name="help_desc_how_to_update_book_3">புத்தகத்தின் விவரங்களைக் காண புத்தகத்தின் அட்டை படத்தைக் சொடுக்கு செய்க. புத்தகத்தைப் புதுப்பிக்க திரையை கீழே இழுக்கவும் அல்லது மேல் வலது மூலையில் உள்ள புதுப்பிப்பு ஐகானைக் சொடுக்கு செய்யவும். புத்தகத்தின் கோப்பு மாற்றப்பட்டால், நீங்கள் புத்தகத்தை உறுதிப்படுத்தி புதுப்பிக்கலாம் அல்லது புதுப்பிப்பை ரத்து செய்யலாம்.</string>
|
||||
<string name="help_title_how_to_manage_history">வரலாற்றை எவ்வாறு நிர்வகிப்பது?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">செல்லுங்கள்</string>
|
||||
<string name="help_desc_how_to_manage_history_3">வரலாற்று உறுப்பின் வலதுபுறத்தில் நீக்கு பொத்தானைக் சொடுக்கு செய்வதன் மூலம், அது நீக்கப்படும். வரலாறு நூலகத்தில் புத்தகங்களை பாதிக்கிறது, வரலாற்று உறுப்பை நீக்குவதன் மூலம் அது ஒரு புத்தகத்தையும் மறுவரிசைப்படுத்தும். கடைசியாக திறக்கப்பட்ட நூல் எப்போதும் நூலகம் மற்றும் வரலாற்றில் முதன்மையானது.</string>
|
||||
|
|
@ -350,7 +333,6 @@
|
|||
<string name="start_permissions_notifications">அறிவிப்புகள் இசைவு</string>
|
||||
<string name="start_done_desc">பயன்பாட்டின் அடிப்படை அமைப்பை நீங்கள் வெற்றிகரமாக முடித்துவிட்டீர்கள். உதவித் திரையைப் படிப்பதன் மூலம் பயன்பாட்டை எவ்வாறு பயன்படுத்துவது என்பதை அறிய விரும்புகிறீர்களா?</string>
|
||||
<string name="yesterday">நேற்று</string>
|
||||
<string name="refresh_book_content_desc">புத்தகத்தை புதுப்பிக்கவும்</string>
|
||||
<string name="continue_reading_content_desc">தொடர்ந்து படிக்கவும்</string>
|
||||
<string name="favorite_directory_content_desc">பிடித்த அடைவு</string>
|
||||
<string name="sort_order_content_desc">வரிசைப்படுத்தும் முறை</string>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
<string name="delete_book">Kitap silinsin mi?</string>
|
||||
<string name="move_book">Kitap taşınsın mı?</string>
|
||||
<string name="delete_history">Okuma geçmişi silinsin mi?</string>
|
||||
<string name="confirm_update">Güncelleme onaylansın mı?</string>
|
||||
<string name="enable_check_for_updates">Güncelleme kontrolü etkinleştirilsin mi?</string>
|
||||
<string name="storage_permission_description">Cihazınızdaki kitapları taramak için depolama izni gerekiyor. Bu izin olmadan kitap ekleyemezsiniz.</string>
|
||||
<string name="add_books_description">Hangi kitapları eklemek istediğinizi seçebilirsiniz. Kitabın Başlığını ve Kapak resmini daha sonra düzenleyebilirsiniz. Yükleme işlemi birkaç dakika sürebilir.</string>
|
||||
|
|
@ -26,7 +25,6 @@
|
|||
<string name="delete_book_description">Bu, kitabı veritabanından silecektir. Bu kitabı cihazınızdan silmeyecektir.</string>
|
||||
<string name="move_book_description">Bu kitabı taşımak istediğiniz kategoriyi seçin. Bu kitap seçilen kategoriye taşınacaktır.</string>
|
||||
<string name="delete_history_description">Bu, tüm geçmişi veritabanından silecektir. Tüm geçmişi sildikten sonra, kitapların sırası sıfırlanacaktır.</string>
|
||||
<string name="confirm_update_description">Bu kitabın metnini ve bölümlerini güncelleyin. Paragrafların sırası değişmediği sürece ilerleme değişmeden kalacaktır.</string>
|
||||
<string name="update_app_description">Yeni uygulama sürümü bulundu. Devam etmek ve yayın sayfasına gitmek istiyor musunuz?</string>
|
||||
<string name="enable_check_for_updates_description">«Güncellemeleri kontrol et» seçeneğini etkinleştirerek uygulama her başlatıldığında «api.github.com» adresinden en son sürüm bilgilerini alacaktır. Devam edip «Güncellemeleri kontrol et» seçeneğini etkinleştirmek istiyor musunuz?</string>
|
||||
<string name="error_permission">Cihazınızdaki kitapları taramak için depolama izni gerekiyor</string>
|
||||
|
|
@ -68,8 +66,6 @@
|
|||
<string name="copy">Kopyala</string>
|
||||
<string name="translate">Çevir</string>
|
||||
<string name="dictionary">Sözlük</string>
|
||||
<string name="retry">Tekrar Dene</string>
|
||||
<string name="confirm">Onayla</string>
|
||||
<string name="next">İleri</string>
|
||||
<string name="yes_go_to_help">Evet, Yardım\'a git</string>
|
||||
<string name="no">Hayır</string>
|
||||
|
|
@ -195,9 +191,6 @@
|
|||
<string name="no_updates">Uygulamanın en son sürümü zaten yüklü.</string>
|
||||
<string name="cover_reset">Kapak resmi başarıyla sıfırlandı.</string>
|
||||
<string name="history_element_deleted">Geçmiş öğesi başarıyla silindi.</string>
|
||||
<string name="file_not_found">\"%1$s\" dosyası bulunamadı.</string>
|
||||
<string name="book_updated">Kitabın metni başarıyla güncellendi.</string>
|
||||
<string name="nothing_changed">Metin güncel.</string>
|
||||
<string name="move_this_book">Taşı</string>
|
||||
<string name="delete_this_book">Sil</string>
|
||||
<string name="details_book">Ayrıntılar</string>
|
||||
|
|
@ -248,10 +241,6 @@
|
|||
<string name="help_desc_how_to_customize_reader_1">Kitabı okumaya başlayın (bkz: Bir kitabı nasıl okurum?), ardından ekrana herhangi bir yere tıklayarak üst ve alt çubukları getirin. Sonra sağ üst köşedeki dişli simgesine tıklayın. Bu, tüm Okuyucu ayarlarını gösterecektir. İkinci yol şuraya gitmektir:</string>
|
||||
<string name="help_desc_how_to_customize_reader_2">Ayarlar</string>
|
||||
<string name="help_desc_how_to_customize_reader_3">ve Genel ayarları özelleştirmek için Okuyucu kategorisini, veya Renk ayarlarını özelleştirmek için Görünüm kategorisini seçin.</string>
|
||||
<string name="help_title_how_to_update_book">Bir kitabı nasıl güncellerim?</string>
|
||||
<string name="help_desc_how_to_update_book_1">Şuraya gidin:</string>
|
||||
<string name="help_desc_how_to_update_book_2">Kütüphane</string>
|
||||
<string name="help_desc_how_to_update_book_3">ve kitabın ayrıntılarını görmek için kitabın kapak görselini tıklayın. Kitabı güncellemek için ekranı aşağı çekin veya sağ üst köşedeki yenileme simgesine tıklayın. Kitap dosyası değiştiyse, kitabı onaylayıp güncelleyebilir veya güncellemeyi iptal edebilirsiniz.</string>
|
||||
<string name="help_title_how_to_manage_history">Geçmişi nasıl yönetirim?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Şuraya gidin:</string>
|
||||
<string name="help_desc_how_to_manage_history_2">Geçmiş</string>
|
||||
|
|
@ -278,7 +267,6 @@
|
|||
<string name="start_done_desc">Uygulamanın temel ayarlarını başarıyla tamamladınız. Yardım ekranını okuyarak uygulamayı nasıl kullanacağınızı öğrenmek ister misiniz?</string>
|
||||
<string name="today">Bugün</string>
|
||||
<string name="yesterday">Dün</string>
|
||||
<string name="refresh_book_content_desc">Kitabı yenile</string>
|
||||
<string name="continue_reading_content_desc">Okumaya devam et</string>
|
||||
<string name="go_back_content_desc">Geri git</string>
|
||||
<string name="cover_image_content_desc">Kapak resmi</string>
|
||||
|
|
@ -330,18 +318,12 @@
|
|||
<string name="cutout_padding_option_desc">Kesme alanına dolgu uygulayın</string>
|
||||
<string name="vertical_padding_option">Dikey dolgu</string>
|
||||
<string name="keep_screen_on_option">Ekranı açık tut</string>
|
||||
<string name="update_book">Kitap güncellensin mi?</string>
|
||||
<string name="reading_speed_reader_settings">Okuma hızı</string>
|
||||
<string name="perception_expander_option_desc">Merkeze odaklanarak okuma hızınızı artırın</string>
|
||||
<string name="perception_expander_thickness_option">Algı iyileştirici satır kalınlığı</string>
|
||||
<string name="check_for_text_update_option_desc">Metin güncellemesi olup olmadığını otomatik olarak denetle</string>
|
||||
<string name="chapters">Bölümler</string>
|
||||
<string name="update_text_content_desc">Metni güncelle</string>
|
||||
<string name="update_book_description">Metin güncellemesi bulundu. En son ayrıştırıcı yöntemlerinin kullanıldığından emin olmak için güncelleme gereklidir. Bu çevrim dışı bir işlemdir. Büyük değişiklikler olmadıkça ilerlemeniz etkilenmeyecektir. Güncellemeye devam etmek istiyor musunuz?</string>
|
||||
<string name="proceed">Devam et</string>
|
||||
<string name="perception_expander_option">Algı iyileştirici</string>
|
||||
<string name="check_for_text_update_option">Metin güncellemesini denetle</string>
|
||||
<string name="check_for_text_update_toast_option">\"metin güncel\" bildirimi göster</string>
|
||||
<string name="no_chapters">Bölüm yok</string>
|
||||
<string name="perception_expander_padding_option">Algı iyileştirici satır dolgusu</string>
|
||||
<string name="hide_bars_on_fast_scroll_option">Hızlı kaydırmada çubukları gizle</string>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
<string name="delete_book">Видалити книгу?</string>
|
||||
<string name="move_book">Перемістити книгу?</string>
|
||||
<string name="delete_history">Видалити історію читання?</string>
|
||||
<string name="confirm_update">Підтвердити оновлення?</string>
|
||||
<string name="enable_check_for_updates">Увімнкути перевірку на оновлення?</string>
|
||||
<string name="update_book">Оновити книгу?</string>
|
||||
|
||||
<!-- Dialog Descriptions -->
|
||||
<string name="storage_permission_description">
|
||||
|
|
@ -65,10 +63,6 @@
|
|||
Це видалить всю історію з бази даних.
|
||||
Після видалення всієї історії порядок книг буде скинутий.
|
||||
</string>
|
||||
<string name="confirm_update_description">
|
||||
Оновіть текст та розділи цієї книги.
|
||||
Прогрес повинен залишитися незмінним, якщо порядок параграфів не був змінений.
|
||||
</string>
|
||||
<string name="update_app_description">
|
||||
Нова версія застосунку була знайдена.
|
||||
Чи бажаєте продовжити та перейти на сторінку релізу?
|
||||
|
|
@ -78,13 +72,6 @@
|
|||
з «api.github.com» кожен раз, коли застосунок запускається.
|
||||
Хочете продовжити та увімкнути «Перевіряти на оновлення»?
|
||||
</string>
|
||||
<string name="update_book_description">
|
||||
Знайдено оновлення тексту книги.
|
||||
Оновлення необхідне для того, щоб забезпечити використання найновіших методів парсингу.
|
||||
Це автономний процес і в більшості випадків пов\'язаний з оновленням парсеру текста.
|
||||
Ваш прогрес не постраждає, якщо не відбудуться значні зміни.
|
||||
Чи бажаєте ви продовжити оновлення?
|
||||
</string>
|
||||
|
||||
<!-- Errors -->
|
||||
<string name="error_permission">
|
||||
|
|
@ -155,8 +142,6 @@
|
|||
<string name="copy">Копіювати</string>
|
||||
<string name="translate">Перекласти</string>
|
||||
<string name="dictionary">Словник</string>
|
||||
<string name="retry">Ще раз</string>
|
||||
<string name="confirm">Підтвердити</string>
|
||||
<string name="next">Далі</string>
|
||||
<string name="yes_go_to_help">Так, перейти в Довідку</string>
|
||||
<string name="no">Ні</string>
|
||||
|
|
@ -259,9 +244,6 @@
|
|||
</string>
|
||||
<string name="perception_expander_padding_option">Бокові відступи лінії</string>
|
||||
<string name="perception_expander_thickness_option">Товщина лінії</string>
|
||||
<string name="check_for_text_update_option">Перевіряти на оновлення тексту</string>
|
||||
<string name="check_for_text_update_option_desc">Автоматично перевіряти чи є оновлення тексту</string>
|
||||
<string name="check_for_text_update_toast_option">Показувати повідомлення \"текст актуальний\"</string>
|
||||
<string name="screen_orientation_option">Орієнтація екрана</string>
|
||||
<string name="custom_screen_brightness_option">Користувацька яскравість</string>
|
||||
<string name="screen_brightness_option">Яскравість</string>
|
||||
|
|
@ -372,9 +354,6 @@
|
|||
|
||||
<!-- Snackbar messages -->
|
||||
<string name="history_element_deleted">Елемент історії був успішно видалений.</string>
|
||||
<string name="file_not_found">Файл \"%1$s\" не знайдено.</string>
|
||||
<string name="book_updated">Текст книги був успішно оновлений.</string>
|
||||
<string name="nothing_changed">Текст актуальний.</string>
|
||||
|
||||
<!-- DropDown properties -->
|
||||
<string name="move_this_book">Перемістити</string>
|
||||
|
|
@ -491,15 +470,6 @@
|
|||
або категорію Зовнішній Вигляд, щоб налаштувати параметри Кольорів.
|
||||
</string>
|
||||
|
||||
<string name="help_title_how_to_update_book">Як мені оновити книгу?</string>
|
||||
<string name="help_desc_how_to_update_book_1">Перейдіть в</string>
|
||||
<string name="help_desc_how_to_update_book_2">Бібліотеку</string>
|
||||
<string name="help_desc_how_to_update_book_3">
|
||||
та натісніть на обкладинку книги, щоб побачити подробиці книги.
|
||||
Потягніть екран вниз або натисніть на іконку оновлення у верхньому правому куті, щоб оновити книгу.
|
||||
Якщо файл книги змінився, ви можете підтвердити і оновити книгу або скасувати оновлення.
|
||||
</string>
|
||||
|
||||
<string name="help_title_how_to_manage_history">Як керувати історією?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Перейдіть в</string>
|
||||
<string name="help_desc_how_to_manage_history_2">Історію</string>
|
||||
|
|
@ -598,7 +568,6 @@
|
|||
<string name="yesterday">Вчора</string>
|
||||
|
||||
<!-- Content description -->
|
||||
<string name="refresh_book_content_desc">Оновити книгу</string>
|
||||
<string name="continue_reading_content_desc">Продовжити читання</string>
|
||||
<string name="go_back_content_desc">Назад</string>
|
||||
<string name="cover_image_content_desc">Обкладинка</string>
|
||||
|
|
@ -642,7 +611,6 @@
|
|||
<string name="checkpoint_back_content_desc">Чекпоінт назад</string>
|
||||
<string name="checkpoint_forward_content_desc">Чекпоінт вперед</string>
|
||||
<string name="chapters_content_desc">Розділи</string>
|
||||
<string name="update_text_content_desc">Оновити текст</string>
|
||||
<string name="more_content_desc">Більше</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -29,7 +29,6 @@
|
|||
<string name="about_screen">关于 app</string>
|
||||
<string name="storage_permission">授予权限?</string>
|
||||
<string name="move_book">移动书?</string>
|
||||
<string name="confirm_update">确认更新?</string>
|
||||
<string name="storage_permission_description">我们需要存储权限以扫描您的设备上的书。没有此权限,您将无法添加书。</string>
|
||||
<string name="delete_books_description">所有已选择的书(%1$s)将会从数据库中删除,但不会从您的设备上删除。</string>
|
||||
<string name="delete_book_description">这本书将会从数据库中删除,但不会从您的设备上删除。</string>
|
||||
|
|
@ -57,8 +56,6 @@
|
|||
<string name="grant_permission">授予权限</string>
|
||||
<string name="go_back">返回</string>
|
||||
<string name="undo">撤销</string>
|
||||
<string name="retry">重试</string>
|
||||
<string name="confirm">确认</string>
|
||||
<string name="next">下一个</string>
|
||||
<string name="unknown_author">未知</string>
|
||||
<string name="read_done">干得好,你已经读完了整本书!</string>
|
||||
|
|
@ -88,7 +85,6 @@
|
|||
<string name="updates_notification_channel">新更新</string>
|
||||
<string name="add_books_description">您可以挑选您想添加哪些书。您可以在之后编辑书的标题与封面图片。加载过程可能会花费数分钟。</string>
|
||||
<string name="move_books_description">选择你想将所选的书(%1$s)移动到的分类。所有被选择的书将会被移动到指定的分类。</string>
|
||||
<string name="confirm_update_description">更新这本书的文本及章节。除非段落顺序发生改变,否则进度将不会改变。</string>
|
||||
<string name="reading_speed_reader_settings">阅读速度</string>
|
||||
<string name="dark_theme_option">暗黑主题</string>
|
||||
<string name="absolute_dark_option">绝对黑暗</string>
|
||||
|
|
@ -97,8 +93,6 @@
|
|||
<string name="cutout_padding_option_desc">将填充应用于镂空区域</string>
|
||||
<string name="browse_pin_favorite_directories_option_desc">在屏幕顶端固定您的收藏目录</string>
|
||||
<string name="browse_pin_favorite_directories_option">固定收藏目录</string>
|
||||
<string name="check_for_text_update_option_desc">自动检查文本是否更新</string>
|
||||
<string name="check_for_text_update_toast_option">显示“文本已更新”通知</string>
|
||||
<string name="browse_grid_size_option">网格大小</string>
|
||||
<string name="dark_theme_follow_system">系统</string>
|
||||
<string name="font_style_normal">正常</string>
|
||||
|
|
@ -123,7 +117,6 @@
|
|||
<string name="fast_color_preset_change_option_desc">向左或向右滑动顶栏以更改颜色预设</string>
|
||||
<string name="text_alignment_option">文本对齐</string>
|
||||
<string name="letter_spacing_option">字母间距</string>
|
||||
<string name="check_for_text_update_option">检查文本更新</string>
|
||||
<string name="browse_layout_option">显示模式</string>
|
||||
<string name="perception_expander_padding_option">感知扩展器行填充</string>
|
||||
<string name="app_theme_option">应用主题</string>
|
||||
|
|
@ -173,7 +166,6 @@
|
|||
<string name="theme_contrast_high">高</string>
|
||||
<string name="red_theme">火星</string>
|
||||
<string name="default_string">默认</string>
|
||||
<string name="update_book">更新书?</string>
|
||||
<string name="proceed">继续</string>
|
||||
<string name="screen_orientation_option">屏幕方向</string>
|
||||
<string name="browse_layout_list">列表</string>
|
||||
|
|
@ -192,7 +184,6 @@
|
|||
<string name="yellow_theme">金星</string>
|
||||
<string name="aqua_theme">天王星</string>
|
||||
<string name="press_again_toast">再次点击返回退出</string>
|
||||
<string name="update_book_description">已发现文本更新。需要更新以确保最新的解析器方法被使用。这是个离线过程。触发发生重大改变否则您的进度将不会被影响。您想继续更新吗?</string>
|
||||
<string name="system_reader_settings">系统</string>
|
||||
<string name="browse_sort_order_name">字母顺序</string>
|
||||
<string name="screen_orientation_portrait">竖屏</string>
|
||||
|
|
@ -242,11 +233,9 @@
|
|||
<string name="app_version_option_desc_2">点击检查更新</string>
|
||||
<string name="help_desc_how_to_add_books_4">库中</string>
|
||||
<string name="file_path">文件路径</string>
|
||||
<string name="file_not_found">没有找到文件“%1$s”。</string>
|
||||
<string name="credits_icon">图标</string>
|
||||
<string name="help_desc_how_to_add_books_2">浏览</string>
|
||||
<string name="slava_ukraini">荣耀属于乌克兰!</string>
|
||||
<string name="book_updated">已成功更新了书的文本。</string>
|
||||
<string name="file_last_opened">文件最后打开</string>
|
||||
<string name="unknown">未知</string>
|
||||
<string name="internal_storage">内部存储</string>
|
||||
|
|
@ -257,7 +246,6 @@
|
|||
<string name="details_book">详细</string>
|
||||
<string name="whats_new_option">新内容</string>
|
||||
<string name="licenses_option">开源许可证</string>
|
||||
<string name="nothing_changed">文本已是最新。</string>
|
||||
<string name="delete_this_book">删除</string>
|
||||
<string name="pure_dark_power_saver">保存</string>
|
||||
<string name="custom_screen_brightness_option">自定义亮度</string>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
<string name="delete_book">Delete book?</string>
|
||||
<string name="move_book">Move book?</string>
|
||||
<string name="delete_history">Delete reading history?</string>
|
||||
<string name="confirm_update">Confirm update?</string>
|
||||
<string name="enable_check_for_updates">Enable check for updates?</string>
|
||||
<string name="update_book">Update book?</string>
|
||||
|
||||
<!-- Dialog Descriptions -->
|
||||
<string name="storage_permission_description">
|
||||
|
|
@ -66,10 +64,6 @@
|
|||
It will delete the whole history from the database.
|
||||
After deleting the whole history, the order of the books will be reset.
|
||||
</string>
|
||||
<string name="confirm_update_description">
|
||||
Update this book\'s text and chapters.
|
||||
The progress should remain unchanged unless the order of paragraphs was changed.
|
||||
</string>
|
||||
<string name="update_app_description">
|
||||
New app version was found.
|
||||
Do you want to proceed and go to the release page?
|
||||
|
|
@ -80,13 +74,6 @@
|
|||
when app starts.
|
||||
Do you want to proceed and enable «Check for updates»?
|
||||
</string>
|
||||
<string name="update_book_description">
|
||||
Update of the text has been found.
|
||||
Update is needed to ensure latest parser methods are used.
|
||||
It is offline process.
|
||||
Your progress will not be affected unless big changes occur.
|
||||
Do you want to proceed with update?
|
||||
</string>
|
||||
|
||||
<!-- Errors -->
|
||||
<string name="error_permission">
|
||||
|
|
@ -156,8 +143,6 @@
|
|||
<string name="copy">Copy</string>
|
||||
<string name="translate">Translate</string>
|
||||
<string name="dictionary">Dictionary</string>
|
||||
<string name="retry">Retry</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="next">Next</string>
|
||||
<string name="yes_go_to_help">Yes, go to Help</string>
|
||||
<string name="no">No</string>
|
||||
|
|
@ -260,9 +245,6 @@
|
|||
</string>
|
||||
<string name="perception_expander_padding_option">Line side margin</string>
|
||||
<string name="perception_expander_thickness_option">Line thickness</string>
|
||||
<string name="check_for_text_update_option">Check for text update</string>
|
||||
<string name="check_for_text_update_option_desc">Automatically check whether there is text update</string>
|
||||
<string name="check_for_text_update_toast_option">Show \"text is up-to-date\" toast</string>
|
||||
<string name="screen_orientation_option">Screen orientation</string>
|
||||
<string name="custom_screen_brightness_option">Custom brightness</string>
|
||||
<string name="screen_brightness_option">Brightness</string>
|
||||
|
|
@ -373,9 +355,6 @@
|
|||
|
||||
<!-- Snackbar messages -->
|
||||
<string name="history_element_deleted">History element was successfully deleted.</string>
|
||||
<string name="file_not_found">File \"%1$s\" was not found.</string>
|
||||
<string name="book_updated">Book\'s text was successfully updated.</string>
|
||||
<string name="nothing_changed">Text is up-to-date.</string>
|
||||
|
||||
<!-- DropDown properties -->
|
||||
<string name="move_this_book">Move</string>
|
||||
|
|
@ -492,15 +471,6 @@
|
|||
or Appearance category to customize Colors settings.
|
||||
</string>
|
||||
|
||||
<string name="help_title_how_to_update_book">How do I update a book?</string>
|
||||
<string name="help_desc_how_to_update_book_1">Go to the</string>
|
||||
<string name="help_desc_how_to_update_book_2">Library</string>
|
||||
<string name="help_desc_how_to_update_book_3">
|
||||
and click the book\'s cover image to see book\'s details.
|
||||
Pull down the screen or click the refresh icon in the upper right corner to update the book.
|
||||
If book\'s file changed you may confirm and update the book or cancel update.
|
||||
</string>
|
||||
|
||||
<string name="help_title_how_to_manage_history">How do I manage history?</string>
|
||||
<string name="help_desc_how_to_manage_history_1">Go to the</string>
|
||||
<string name="help_desc_how_to_manage_history_2">History</string>
|
||||
|
|
@ -598,7 +568,6 @@
|
|||
<string name="yesterday">Yesterday</string>
|
||||
|
||||
<!-- Content description -->
|
||||
<string name="refresh_book_content_desc">Refresh book</string>
|
||||
<string name="continue_reading_content_desc">Continue reading</string>
|
||||
<string name="go_back_content_desc">Go back</string>
|
||||
<string name="cover_image_content_desc">Cover image</string>
|
||||
|
|
@ -645,7 +614,6 @@
|
|||
<string name="checkpoint_back_content_desc">Checkpoint back</string>
|
||||
<string name="checkpoint_forward_content_desc">Checkpoint forward</string>
|
||||
<string name="chapters_content_desc">Chapters</string>
|
||||
<string name="update_text_content_desc">Update text</string>
|
||||
<string name="more_content_desc">More</string>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue