Change app name from Etsudoku to Shirizu
This commit is contained in:
2
.idea/.name
generated
2
.idea/.name
generated
@@ -1 +1 @@
|
||||
Etsudoku
|
||||
Shirizu
|
||||
4
.idea/deploymentTargetDropDown.xml
generated
4
.idea/deploymentTargetDropDown.xml
generated
@@ -13,12 +13,12 @@
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\xtimms\.android\avd\Pixel_API_27.avd" />
|
||||
<value value="C:\Users\xtimms\.android\avd\Pixel_5_API_34.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2024-03-30T18:28:38.815975400Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2024-04-06T08:29:40.034958200Z" />
|
||||
</State>
|
||||
</entry>
|
||||
</value>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<div align="center">
|
||||
|
||||
<a>
|
||||
<img src="./app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" alt="Etsudoku logo" title="Etsudoku logo" width="80"/>
|
||||
<img src="./app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" alt="Shirizu logo" title="Shirizu logo" width="80"/>
|
||||
</a>
|
||||
|
||||
# Etsudoku
|
||||
# Shirizu
|
||||
|
||||
</div>
|
||||
|
||||
Etsudoku (閲読) - An attempt to write an Android manga reading application on Jetpack Compose using the [Kotatsu parser library](https://github.com/KotatsuApp/kotatsu-parsers).
|
||||
Shirizu (シリーズ, from Japanese - series) - An attempt to write an Android manga reading application on Jetpack Compose using the [Kotatsu parser library](https://github.com/KotatsuApp/kotatsu-parsers).
|
||||
|
||||
## Is it possible to use it now?
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ val acraAuthLogin: String = gradleLocalProperties(rootDir).getProperty("authLogi
|
||||
val acraAuthPassword: String = gradleLocalProperties(rootDir).getProperty("authPassword") ?: "\"acra_password\""
|
||||
|
||||
android {
|
||||
namespace = "org.xtimms.etsudoku"
|
||||
namespace = "org.xtimms.shirizu"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "org.xtimms.etsudoku"
|
||||
applicationId = "org.xtimms.shirizu"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
@@ -37,7 +37,7 @@ android {
|
||||
buildConfigField("String", "ACRA_AUTH_LOGIN", acraAuthLogin)
|
||||
buildConfigField("String", "ACRA_AUTH_PASSWORD", acraAuthPassword)
|
||||
|
||||
testInstrumentationRunner = "org.xtimms.etsudoku.HiltTestRunner"
|
||||
testInstrumentationRunner = "org.xtimms.shirizu.HiltTestRunner"
|
||||
vectorDrawables {
|
||||
useSupportLibrary = true
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.app.Instrumentation
|
||||
import kotlin.coroutines.resume
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.squareup.moshi.FromJson
|
||||
@@ -11,7 +11,7 @@ import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import okio.buffer
|
||||
import okio.source
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.xtimms.etsudoku.core.model.FavouriteCategory
|
||||
import org.xtimms.shirizu.core.model.FavouriteCategory
|
||||
import java.util.Date
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.sections.settings.backup
|
||||
package org.xtimms.shirizu.sections.settings.backup
|
||||
|
||||
import android.content.res.AssetManager
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
@@ -12,12 +12,12 @@ import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.xtimms.etsudoku.SampleData
|
||||
import org.xtimms.etsudoku.core.database.EtsudokuDatabase
|
||||
import org.xtimms.etsudoku.core.database.entity.toMangaTags
|
||||
import org.xtimms.etsudoku.data.repository.FavouritesRepository
|
||||
import org.xtimms.etsudoku.data.repository.HistoryRepository
|
||||
import org.xtimms.etsudoku.data.repository.backup.BackupRepository
|
||||
import org.xtimms.shirizu.SampleData
|
||||
import org.xtimms.shirizu.core.database.ShirizuDatabase
|
||||
import org.xtimms.shirizu.core.database.entity.toMangaTags
|
||||
import org.xtimms.shirizu.data.repository.FavouritesRepository
|
||||
import org.xtimms.shirizu.data.repository.HistoryRepository
|
||||
import org.xtimms.shirizu.data.repository.backup.BackupRepository
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -38,7 +38,7 @@ class AppBackupAgentTest {
|
||||
lateinit var backupRepository: BackupRepository
|
||||
|
||||
@Inject
|
||||
lateinit var database: EtsudokuDatabase
|
||||
lateinit var database: ShirizuDatabase
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
@@ -35,7 +35,7 @@
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Etsudoku.Starting"
|
||||
android:theme="@style/Theme.Shirizu"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
tools:targetApi="tiramisu">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Etsudoku">
|
||||
android:theme="@style/Theme.Shirizu.SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.details
|
||||
|
||||
import org.xtimms.etsudoku.core.base.event.UiEvent
|
||||
|
||||
interface DetailsEvent : UiEvent
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.explore
|
||||
|
||||
import org.xtimms.etsudoku.core.base.event.UiEvent
|
||||
|
||||
interface ExploreEvent : UiEvent
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.list
|
||||
|
||||
import org.xtimms.etsudoku.core.base.event.PagedUiEvent
|
||||
|
||||
interface MangaListEvent : PagedUiEvent
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.reader
|
||||
|
||||
import org.xtimms.etsudoku.sections.reader.pager.ReaderPage
|
||||
|
||||
data class ReaderContent(
|
||||
val pages: List<ReaderPage>,
|
||||
val state: ReaderState?
|
||||
)
|
||||
@@ -1,88 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.settings.appearance
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.ElevatedCard
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.PreviewLightDark
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
|
||||
@Composable
|
||||
fun MangaCard(
|
||||
modifier: Modifier = Modifier,
|
||||
title: String = "Ookami to Koushinryou",
|
||||
author: String = "Hasekura Isuna",
|
||||
thumbnailUrl: Any = "",
|
||||
showCancelButton: Boolean = false,
|
||||
onCancel: () -> Unit = {},
|
||||
onClick: () -> Unit = {},
|
||||
progress: Float = 75f,
|
||||
) {
|
||||
ElevatedCard(
|
||||
modifier = modifier
|
||||
.height(136.dp)
|
||||
.fillMaxWidth(),
|
||||
onClick = onClick,
|
||||
shape = MaterialTheme.shapes.small,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Image(
|
||||
modifier = Modifier
|
||||
.padding()
|
||||
.fillMaxHeight()
|
||||
.clip(MaterialTheme.shapes.small),
|
||||
painter = painterResource(id = R.drawable.ookami),
|
||||
contentDescription = null
|
||||
)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(horizontal = 12.dp, vertical = 8.dp)
|
||||
.fillMaxWidth(),
|
||||
verticalArrangement = Arrangement.Top
|
||||
) {
|
||||
Text(
|
||||
text = title,
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
maxLines = 2,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
if (author != "null") Text(
|
||||
modifier = Modifier.padding(top = 3.dp),
|
||||
text = author,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@PreviewLightDark
|
||||
@Composable
|
||||
fun MangaCardPreview() {
|
||||
EtsudokuTheme {
|
||||
MangaCard(
|
||||
thumbnailUrl = "https://spice-and-wolf.com/special/img/visual_january.jpg"
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.xtimms.etsudoku.sections.settings.storage
|
||||
|
||||
import org.xtimms.etsudoku.core.base.event.UiEvent
|
||||
|
||||
interface StorageEvent : UiEvent
|
||||
@@ -1,3 +0,0 @@
|
||||
package org.xtimms.etsudoku.utils.material
|
||||
|
||||
const val SecondaryItemAlpha = .78f
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.xtimms.etsudoku.work.tracker
|
||||
|
||||
import org.xtimms.etsudoku.core.tracker.model.MangaTracking
|
||||
|
||||
data class TrackingItem(
|
||||
val tracking: MangaTracking,
|
||||
val channelId: String?,
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
@@ -20,12 +20,12 @@ import org.acra.data.StringFormat
|
||||
import org.acra.ktx.initAcra
|
||||
import org.acra.sender.HttpSender
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.xtimms.etsudoku.core.database.EtsudokuDatabase
|
||||
import org.xtimms.etsudoku.core.prefs.AppSettings
|
||||
import org.xtimms.etsudoku.core.prefs.KotatsuAppSettings
|
||||
import org.xtimms.etsudoku.core.updates.Updater
|
||||
import org.xtimms.etsudoku.utils.lang.processLifecycleScope
|
||||
import org.xtimms.etsudoku.work.WorkScheduleManager
|
||||
import org.xtimms.shirizu.core.database.ShirizuDatabase
|
||||
import org.xtimms.shirizu.core.prefs.AppSettings
|
||||
import org.xtimms.shirizu.core.prefs.KotatsuAppSettings
|
||||
import org.xtimms.shirizu.core.updates.Updater
|
||||
import org.xtimms.shirizu.utils.lang.processLifecycleScope
|
||||
import org.xtimms.shirizu.work.WorkScheduleManager
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Provider
|
||||
|
||||
@@ -33,7 +33,7 @@ import javax.inject.Provider
|
||||
class App : Application(), Configuration.Provider {
|
||||
|
||||
@Inject
|
||||
lateinit var database: Provider<EtsudokuDatabase>
|
||||
lateinit var database: Provider<ShirizuDatabase>
|
||||
|
||||
@Inject
|
||||
lateinit var settings: KotatsuAppSettings
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
@@ -11,13 +11,13 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.ui.theme.SEED
|
||||
import org.xtimms.etsudoku.core.prefs.AppSettings
|
||||
import org.xtimms.etsudoku.core.prefs.DarkThemePreference
|
||||
import org.xtimms.etsudoku.core.prefs.paletteStyles
|
||||
import org.xtimms.etsudoku.ui.monet.LocalTonalPalettes
|
||||
import org.xtimms.etsudoku.ui.monet.PaletteStyle
|
||||
import org.xtimms.etsudoku.ui.monet.TonalPalettes.Companion.toTonalPalettes
|
||||
import org.xtimms.shirizu.ui.theme.SEED
|
||||
import org.xtimms.shirizu.core.prefs.AppSettings
|
||||
import org.xtimms.shirizu.core.prefs.DarkThemePreference
|
||||
import org.xtimms.shirizu.core.prefs.paletteStyles
|
||||
import org.xtimms.shirizu.ui.monet.LocalTonalPalettes
|
||||
import org.xtimms.shirizu.ui.monet.PaletteStyle
|
||||
import org.xtimms.shirizu.ui.monet.TonalPalettes.Companion.toTonalPalettes
|
||||
|
||||
data class BottomSheetScrollState(
|
||||
val topPadding: Dp,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
@@ -58,18 +58,18 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.xtimms.etsudoku.core.Navigation
|
||||
import org.xtimms.etsudoku.core.components.BottomNavBar
|
||||
import org.xtimms.etsudoku.core.components.ContinueReadingButton
|
||||
import org.xtimms.etsudoku.core.components.NavigationRail
|
||||
import org.xtimms.etsudoku.core.components.TopAppBar
|
||||
import org.xtimms.etsudoku.core.logs.FileLogger
|
||||
import org.xtimms.etsudoku.core.prefs.AppSettings
|
||||
import org.xtimms.etsudoku.core.screens.UpdateDialogImpl
|
||||
import org.xtimms.etsudoku.core.updates.Updater
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.etsudoku.utils.system.setLanguage
|
||||
import org.xtimms.etsudoku.utils.system.suspendToast
|
||||
import org.xtimms.shirizu.core.Navigation
|
||||
import org.xtimms.shirizu.core.components.BottomNavBar
|
||||
import org.xtimms.shirizu.core.components.ContinueReadingButton
|
||||
import org.xtimms.shirizu.core.components.NavigationRail
|
||||
import org.xtimms.shirizu.core.components.TopAppBar
|
||||
import org.xtimms.shirizu.core.logs.FileLogger
|
||||
import org.xtimms.shirizu.core.prefs.AppSettings
|
||||
import org.xtimms.shirizu.core.screens.UpdateDialogImpl
|
||||
import org.xtimms.shirizu.core.updates.Updater
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import org.xtimms.shirizu.utils.system.setLanguage
|
||||
import org.xtimms.shirizu.utils.system.suspendToast
|
||||
import javax.inject.Inject
|
||||
|
||||
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
|
||||
@@ -142,7 +142,7 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
if (isReady.value) {
|
||||
SettingsProvider {
|
||||
EtsudokuTheme(
|
||||
ShirizuTheme(
|
||||
darkTheme = LocalDarkTheme.current.isDarkTheme(),
|
||||
isDynamicColorEnabled = LocalDynamicColorSwitch.current,
|
||||
isHighContrastModeEnabled = LocalDarkTheme.current.isHighContrastModeEnabled,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku
|
||||
package org.xtimms.shirizu
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
@@ -20,28 +20,28 @@ import kotlinx.coroutines.flow.SharedFlow
|
||||
import kotlinx.coroutines.flow.asSharedFlow
|
||||
import okhttp3.OkHttpClient
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.xtimms.etsudoku.core.cache.CacheDir
|
||||
import org.xtimms.etsudoku.core.cache.ContentCache
|
||||
import org.xtimms.etsudoku.core.cache.MemoryContentCache
|
||||
import org.xtimms.etsudoku.core.cache.StubContentCache
|
||||
import org.xtimms.etsudoku.core.database.EtsudokuDatabase
|
||||
import org.xtimms.etsudoku.core.model.LocalManga
|
||||
import org.xtimms.etsudoku.core.network.MangaHttpClient
|
||||
import org.xtimms.etsudoku.core.network.interceptors.ImageProxyInterceptor
|
||||
import org.xtimms.etsudoku.core.os.NetworkState
|
||||
import org.xtimms.etsudoku.core.parser.MangaLoaderContextImpl
|
||||
import org.xtimms.etsudoku.core.parser.MangaRepository
|
||||
import org.xtimms.etsudoku.core.parser.favicon.FaviconFetcher
|
||||
import org.xtimms.etsudoku.core.parser.local.LocalStorageChanges
|
||||
import org.xtimms.etsudoku.sections.reader.thumbnails.MangaPageFetcher
|
||||
import org.xtimms.etsudoku.utils.CoilImageGetter
|
||||
import org.xtimms.etsudoku.utils.system.connectivityManager
|
||||
import org.xtimms.etsudoku.utils.system.isLowRamDevice
|
||||
import org.xtimms.shirizu.core.cache.CacheDir
|
||||
import org.xtimms.shirizu.core.cache.ContentCache
|
||||
import org.xtimms.shirizu.core.cache.MemoryContentCache
|
||||
import org.xtimms.shirizu.core.cache.StubContentCache
|
||||
import org.xtimms.shirizu.core.database.ShirizuDatabase
|
||||
import org.xtimms.shirizu.core.model.LocalManga
|
||||
import org.xtimms.shirizu.core.network.MangaHttpClient
|
||||
import org.xtimms.shirizu.core.network.interceptors.ImageProxyInterceptor
|
||||
import org.xtimms.shirizu.core.os.NetworkState
|
||||
import org.xtimms.shirizu.core.parser.MangaLoaderContextImpl
|
||||
import org.xtimms.shirizu.core.parser.MangaRepository
|
||||
import org.xtimms.shirizu.core.parser.favicon.FaviconFetcher
|
||||
import org.xtimms.shirizu.core.parser.local.LocalStorageChanges
|
||||
import org.xtimms.shirizu.sections.reader.thumbnails.MangaPageFetcher
|
||||
import org.xtimms.shirizu.utils.CoilImageGetter
|
||||
import org.xtimms.shirizu.utils.system.connectivityManager
|
||||
import org.xtimms.shirizu.utils.system.isLowRamDevice
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
interface EtsudokuModule {
|
||||
interface ShirizuModule {
|
||||
|
||||
@Binds
|
||||
fun bindMangaLoaderContext(mangaLoaderContextImpl: MangaLoaderContextImpl): MangaLoaderContext
|
||||
@@ -61,8 +61,8 @@ interface EtsudokuModule {
|
||||
@Singleton
|
||||
fun provideMangaDatabase(
|
||||
@ApplicationContext context: Context,
|
||||
): EtsudokuDatabase {
|
||||
return EtsudokuDatabase(context)
|
||||
): ShirizuDatabase {
|
||||
return ShirizuDatabase(context)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core
|
||||
package org.xtimms.shirizu.core
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -14,8 +14,8 @@ import androidx.compose.ui.res.painterResource
|
||||
import coil.ImageLoader
|
||||
import coil.compose.AsyncImage
|
||||
import coil.compose.AsyncImagePainter
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.utils.composable.rememberResourceBitmapPainter
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.utils.composable.rememberResourceBitmapPainter
|
||||
|
||||
@Composable
|
||||
fun AsyncImageImpl(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core
|
||||
package org.xtimms.shirizu.core
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.material.icons.Icons
|
||||
@@ -11,10 +11,10 @@ import androidx.compose.material.icons.outlined.LocalLibrary
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.shelf.SHELF_DESTINATION
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.shirizu.sections.shelf.SHELF_DESTINATION
|
||||
|
||||
sealed class BottomNavDestination(
|
||||
val value: String,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core
|
||||
package org.xtimms.shirizu.core
|
||||
|
||||
import androidx.compose.animation.core.Animatable
|
||||
import androidx.compose.animation.core.AnimationVector1D
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core
|
||||
package org.xtimms.shirizu.core
|
||||
|
||||
import android.graphics.Path
|
||||
import android.view.animation.PathInterpolator
|
||||
@@ -20,69 +20,69 @@ import androidx.navigation.compose.composable
|
||||
import androidx.navigation.navArgument
|
||||
import coil.ImageLoader
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.xtimms.etsudoku.core.logs.FileLogger
|
||||
import org.xtimms.etsudoku.sections.details.DETAILS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.details.DetailsView
|
||||
import org.xtimms.etsudoku.sections.details.FULL_POSTER_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.details.FullImageView
|
||||
import org.xtimms.etsudoku.sections.details.MANGA_ID_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.details.PICTURES_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.explore.ExploreView
|
||||
import org.xtimms.etsudoku.sections.feed.FEED_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.feed.FeedView
|
||||
import org.xtimms.etsudoku.sections.history.HistoryView
|
||||
import org.xtimms.etsudoku.sections.list.LIST_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.list.MangaListView
|
||||
import org.xtimms.etsudoku.sections.list.PROVIDER_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.reader.READER_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.reader.ReaderView
|
||||
import org.xtimms.etsudoku.sections.search.SEARCH_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.search.SearchHostView
|
||||
import org.xtimms.etsudoku.sections.settings.SETTINGS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.SettingsView
|
||||
import org.xtimms.etsudoku.sections.settings.about.ABOUT_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.about.AboutView
|
||||
import org.xtimms.etsudoku.sections.settings.about.LICENSES_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.about.LICENSE_CONTENT_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.settings.about.LICENSE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.about.LICENSE_NAME_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.settings.about.LICENSE_WEBSITE_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.settings.about.LicenseView
|
||||
import org.xtimms.etsudoku.sections.settings.about.OpenSourceLicensesView
|
||||
import org.xtimms.etsudoku.sections.settings.about.UPDATES_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.about.UpdateView
|
||||
import org.xtimms.etsudoku.sections.settings.advanced.ADVANCED_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.advanced.AdvancedView
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.APPEARANCE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.AppearanceView
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.DARK_THEME_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.DarkThemeView
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.LANGUAGES_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.appearance.LanguagesView
|
||||
import org.xtimms.etsudoku.sections.settings.backup.BACKUP_RESTORE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.backup.BackupRestoreView
|
||||
import org.xtimms.etsudoku.sections.settings.backup.RESTORE_ARGUMENT
|
||||
import org.xtimms.etsudoku.sections.settings.backup.RESTORE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.backup.RestoreItemsView
|
||||
import org.xtimms.etsudoku.sections.settings.network.NETWORK_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.network.NetworkView
|
||||
import org.xtimms.etsudoku.sections.settings.shelf.SHELF_SETTINGS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.shelf.ShelfSettingsView
|
||||
import org.xtimms.etsudoku.sections.settings.shelf.categories.CATEGORIES_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.shelf.categories.CategoriesView
|
||||
import org.xtimms.etsudoku.sections.settings.sources.SOURCES_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.sources.SourcesView
|
||||
import org.xtimms.etsudoku.sections.settings.sources.catalog.CATALOG_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.sources.catalog.SourcesCatalogView
|
||||
import org.xtimms.etsudoku.sections.settings.storage.STORAGE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.storage.StorageView
|
||||
import org.xtimms.etsudoku.sections.shelf.ShelfView
|
||||
import org.xtimms.etsudoku.sections.stats.STATS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.stats.StatsView
|
||||
import org.xtimms.etsudoku.sections.suggestions.SUGGESTIONS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.suggestions.SuggestionsView
|
||||
import org.xtimms.etsudoku.utils.StringArrayNavType
|
||||
import org.xtimms.etsudoku.utils.lang.removeFirstAndLast
|
||||
import org.xtimms.shirizu.core.logs.FileLogger
|
||||
import org.xtimms.shirizu.sections.details.DETAILS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.details.DetailsView
|
||||
import org.xtimms.shirizu.sections.details.FULL_POSTER_DESTINATION
|
||||
import org.xtimms.shirizu.sections.details.FullImageView
|
||||
import org.xtimms.shirizu.sections.details.MANGA_ID_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.details.PICTURES_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.explore.ExploreView
|
||||
import org.xtimms.shirizu.sections.feed.FEED_DESTINATION
|
||||
import org.xtimms.shirizu.sections.feed.FeedView
|
||||
import org.xtimms.shirizu.sections.history.HistoryView
|
||||
import org.xtimms.shirizu.sections.list.LIST_DESTINATION
|
||||
import org.xtimms.shirizu.sections.list.MangaListView
|
||||
import org.xtimms.shirizu.sections.list.PROVIDER_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.reader.READER_DESTINATION
|
||||
import org.xtimms.shirizu.sections.reader.ReaderView
|
||||
import org.xtimms.shirizu.sections.search.SEARCH_DESTINATION
|
||||
import org.xtimms.shirizu.sections.search.SearchHostView
|
||||
import org.xtimms.shirizu.sections.settings.SETTINGS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.SettingsView
|
||||
import org.xtimms.shirizu.sections.settings.about.ABOUT_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.about.AboutView
|
||||
import org.xtimms.shirizu.sections.settings.about.LICENSES_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.about.LICENSE_CONTENT_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.settings.about.LICENSE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.about.LICENSE_NAME_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.settings.about.LICENSE_WEBSITE_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.settings.about.LicenseView
|
||||
import org.xtimms.shirizu.sections.settings.about.OpenSourceLicensesView
|
||||
import org.xtimms.shirizu.sections.settings.about.UPDATES_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.about.UpdateView
|
||||
import org.xtimms.shirizu.sections.settings.advanced.ADVANCED_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.advanced.AdvancedView
|
||||
import org.xtimms.shirizu.sections.settings.appearance.APPEARANCE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.appearance.AppearanceView
|
||||
import org.xtimms.shirizu.sections.settings.appearance.DARK_THEME_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.appearance.DarkThemeView
|
||||
import org.xtimms.shirizu.sections.settings.appearance.LANGUAGES_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.appearance.LanguagesView
|
||||
import org.xtimms.shirizu.sections.settings.backup.BACKUP_RESTORE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.backup.BackupRestoreView
|
||||
import org.xtimms.shirizu.sections.settings.backup.RESTORE_ARGUMENT
|
||||
import org.xtimms.shirizu.sections.settings.backup.RESTORE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.backup.RestoreItemsView
|
||||
import org.xtimms.shirizu.sections.settings.network.NETWORK_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.network.NetworkView
|
||||
import org.xtimms.shirizu.sections.settings.shelf.SHELF_SETTINGS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.shelf.ShelfSettingsView
|
||||
import org.xtimms.shirizu.sections.settings.shelf.categories.CATEGORIES_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.shelf.categories.CategoriesView
|
||||
import org.xtimms.shirizu.sections.settings.sources.SOURCES_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.sources.SourcesView
|
||||
import org.xtimms.shirizu.sections.settings.sources.catalog.CATALOG_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.sources.catalog.SourcesCatalogView
|
||||
import org.xtimms.shirizu.sections.settings.storage.STORAGE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.storage.StorageView
|
||||
import org.xtimms.shirizu.sections.shelf.ShelfView
|
||||
import org.xtimms.shirizu.sections.stats.STATS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.stats.StatsView
|
||||
import org.xtimms.shirizu.sections.suggestions.SUGGESTIONS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.suggestions.SuggestionsView
|
||||
import org.xtimms.shirizu.utils.StringArrayNavType
|
||||
import org.xtimms.shirizu.utils.lang.removeFirstAndLast
|
||||
|
||||
const val DURATION_ENTER = 400
|
||||
const val DURATION_EXIT = 200
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base
|
||||
package org.xtimms.shirizu.core.base
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base
|
||||
package org.xtimms.shirizu.core.base
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.event
|
||||
package org.xtimms.shirizu.core.base.event
|
||||
|
||||
interface PagedUiEvent : UiEvent {
|
||||
fun loadMore()
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.event
|
||||
package org.xtimms.shirizu.core.base.event
|
||||
|
||||
interface UiEvent {
|
||||
fun showMessage(message: String?)
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.state
|
||||
package org.xtimms.shirizu.core.base.state
|
||||
|
||||
abstract class PagedUiState : UiState() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.state
|
||||
package org.xtimms.shirizu.core.base.state
|
||||
|
||||
abstract class UiState {
|
||||
abstract val isLoading: Boolean
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.viewmodel
|
||||
package org.xtimms.shirizu.core.base.viewmodel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
@@ -11,11 +11,11 @@ import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import org.xtimms.etsudoku.core.base.event.UiEvent
|
||||
import org.xtimms.etsudoku.core.base.state.UiState
|
||||
import org.xtimms.etsudoku.utils.lang.EventFlow
|
||||
import org.xtimms.etsudoku.utils.lang.MutableEventFlow
|
||||
import org.xtimms.etsudoku.utils.lang.call
|
||||
import org.xtimms.shirizu.core.base.event.UiEvent
|
||||
import org.xtimms.shirizu.core.base.state.UiState
|
||||
import org.xtimms.shirizu.utils.lang.EventFlow
|
||||
import org.xtimms.shirizu.utils.lang.MutableEventFlow
|
||||
import org.xtimms.shirizu.utils.lang.call
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlin.coroutines.cancellation.CancellationException
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.base.viewmodel
|
||||
package org.xtimms.shirizu.core.base.viewmodel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
@@ -17,9 +17,9 @@ import kotlinx.coroutines.flow.onStart
|
||||
import kotlinx.coroutines.flow.stateIn
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import org.xtimms.etsudoku.utils.lang.EventFlow
|
||||
import org.xtimms.etsudoku.utils.lang.MutableEventFlow
|
||||
import org.xtimms.etsudoku.utils.lang.call
|
||||
import org.xtimms.shirizu.utils.lang.EventFlow
|
||||
import org.xtimms.shirizu.utils.lang.MutableEventFlow
|
||||
import org.xtimms.shirizu.utils.lang.call
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlin.coroutines.cancellation.CancellationException
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
enum class CacheDir(val dir: String) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.parsers.model.MangaPage
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import androidx.collection.LruCache
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import android.os.SystemClock
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import android.app.Application
|
||||
import android.content.ComponentCallbacks2
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
@@ -13,13 +13,13 @@ import okio.buffer
|
||||
import okio.sink
|
||||
import org.koitharu.kotatsu.parsers.util.SuspendLazy
|
||||
import org.koitharu.kotatsu.parsers.util.runCatchingCancellable
|
||||
import org.xtimms.etsudoku.utils.FileSize
|
||||
import org.xtimms.etsudoku.utils.lang.longHashCode
|
||||
import org.xtimms.etsudoku.utils.lang.writeAllCancellable
|
||||
import org.xtimms.etsudoku.utils.system.compressToPNG
|
||||
import org.xtimms.etsudoku.utils.system.subdir
|
||||
import org.xtimms.etsudoku.utils.system.takeIfReadable
|
||||
import org.xtimms.etsudoku.utils.system.takeIfWriteable
|
||||
import org.xtimms.shirizu.utils.FileSize
|
||||
import org.xtimms.shirizu.utils.lang.longHashCode
|
||||
import org.xtimms.shirizu.utils.lang.writeAllCancellable
|
||||
import org.xtimms.shirizu.utils.system.compressToPNG
|
||||
import org.xtimms.shirizu.utils.system.subdir
|
||||
import org.xtimms.shirizu.utils.system.takeIfReadable
|
||||
import org.xtimms.shirizu.utils.system.takeIfWriteable
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import kotlinx.coroutines.Deferred
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.cache
|
||||
package org.xtimms.shirizu.core.cache
|
||||
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.parsers.model.MangaPage
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
@@ -31,7 +31,7 @@ import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.min
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import java.lang.Integer.MAX_VALUE
|
||||
import kotlin.math.min
|
||||
|
||||
@@ -105,7 +105,7 @@ fun AnimatedButton(
|
||||
@Preview(name = "Icon")
|
||||
@Composable
|
||||
private fun PreviewWithIcon() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
AnimatedButton(
|
||||
type = ButtonType.PRIMARY,
|
||||
icon = Icons.Outlined.Edit
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.SizeTransform
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.core.Animatable
|
||||
import androidx.compose.animation.core.TweenSpec
|
||||
@@ -14,8 +14,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.times
|
||||
import org.xtimms.etsudoku.core.components.shape.WavyShape
|
||||
import org.xtimms.etsudoku.utils.lang.clamp
|
||||
import org.xtimms.shirizu.core.components.shape.WavyShape
|
||||
import org.xtimms.shirizu.utils.lang.clamp
|
||||
|
||||
@Composable
|
||||
fun BackgroundProgress(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.core.Animatable
|
||||
@@ -19,11 +19,11 @@ import androidx.navigation.NavController
|
||||
import androidx.navigation.NavGraph.Companion.findStartDestination
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import kotlinx.coroutines.launch
|
||||
import org.xtimms.etsudoku.core.BottomNavDestination
|
||||
import org.xtimms.etsudoku.core.BottomNavDestination.Companion.Icon
|
||||
import org.xtimms.etsudoku.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.shelf.SHELF_DESTINATION
|
||||
import org.xtimms.shirizu.core.BottomNavDestination
|
||||
import org.xtimms.shirizu.core.BottomNavDestination.Companion.Icon
|
||||
import org.xtimms.shirizu.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.shirizu.sections.shelf.SHELF_DESTINATION
|
||||
|
||||
@Composable
|
||||
fun BottomNavBar(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@@ -12,7 +12,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.shirizu.R
|
||||
|
||||
@Composable
|
||||
fun ConfirmButton(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
@@ -23,9 +23,9 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.reader.READER_DESTINATION
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.shirizu.sections.reader.READER_DESTINATION
|
||||
|
||||
@Composable
|
||||
fun ContinueReadingButton(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.foundation.background
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -34,7 +34,7 @@ private val ButtonsCrossAxisSpacing = Arrangement.spacedBy(12.dp, Alignment.Top)
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
fun EtsudokuDialog(
|
||||
fun ShirizuDialog(
|
||||
onDismissRequest: () -> Unit,
|
||||
confirmButton: @Composable () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.height
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.core.CubicBezierEasing
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import android.text.Spanned
|
||||
import android.text.style.BulletSpan
|
||||
@@ -28,7 +28,7 @@ import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.core.text.HtmlCompat
|
||||
import org.xtimms.etsudoku.utils.spanStyle
|
||||
import org.xtimms.shirizu.utils.spanStyle
|
||||
|
||||
private const val URL_TAG = "url_tag"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
@@ -14,7 +14,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.shirizu.R
|
||||
|
||||
@Composable
|
||||
fun BackIconButton(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.clickable
|
||||
@@ -14,7 +14,7 @@ import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import coil.ImageLoader
|
||||
import coil.compose.AsyncImage
|
||||
import org.xtimms.etsudoku.core.AsyncImageImpl
|
||||
import org.xtimms.shirizu.core.AsyncImageImpl
|
||||
|
||||
enum class MangaCover(val ratio: Float) {
|
||||
Square(1f / 1f),
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
@@ -33,7 +33,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import coil.ImageLoader
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.xtimms.etsudoku.core.AsyncImageImpl
|
||||
import org.xtimms.shirizu.core.AsyncImageImpl
|
||||
|
||||
private const val GridSelectedCoverAlpha = 0.76f
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@@ -19,9 +19,9 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavGraph.Companion.findStartDestination
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import org.xtimms.etsudoku.core.BottomNavDestination
|
||||
import org.xtimms.etsudoku.core.BottomNavDestination.Companion.Icon
|
||||
import org.xtimms.etsudoku.sections.search.SEARCH_DESTINATION
|
||||
import org.xtimms.shirizu.core.BottomNavDestination
|
||||
import org.xtimms.shirizu.core.BottomNavDestination.Companion.Icon
|
||||
import org.xtimms.shirizu.sections.search.SEARCH_DESTINATION
|
||||
|
||||
@Composable
|
||||
fun NavigationRail(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.SizeTransform
|
||||
@@ -65,14 +65,14 @@ import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.xtimms.etsudoku.ui.theme.FixedAccentColors
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.ui.monet.LocalTonalPalettes
|
||||
import org.xtimms.etsudoku.ui.monet.TonalPalettes.Companion.toTonalPalettes
|
||||
import org.xtimms.etsudoku.ui.theme.PreviewThemeLight
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.etsudoku.ui.theme.applyOpacity
|
||||
import org.xtimms.etsudoku.utils.FileSize
|
||||
import org.xtimms.shirizu.ui.theme.FixedAccentColors
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.ui.monet.LocalTonalPalettes
|
||||
import org.xtimms.shirizu.ui.monet.TonalPalettes.Companion.toTonalPalettes
|
||||
import org.xtimms.shirizu.ui.theme.PreviewThemeLight
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import org.xtimms.shirizu.ui.theme.applyOpacity
|
||||
import org.xtimms.shirizu.utils.FileSize
|
||||
|
||||
private const val horizontal = 8
|
||||
private const val vertical = 16
|
||||
@@ -754,7 +754,7 @@ fun PreferenceStorageItem(
|
||||
@Composable
|
||||
@Preview(showBackground = true)
|
||||
fun PreferenceStorageHeaderPreview() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
PreferenceStorageHeader()
|
||||
}
|
||||
}
|
||||
@@ -762,7 +762,7 @@ fun PreferenceStorageHeaderPreview() {
|
||||
@Composable
|
||||
@Preview(showBackground = true)
|
||||
fun PreferenceStorageItemPreview() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
PreferenceStorageItem(title = "Saved manga", icon = Icons.Outlined.Save, total = 0F)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.core.animate
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import android.content.res.Configuration.UI_MODE_NIGHT_YES
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
@@ -46,10 +46,10 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.launch
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.core.model.MangaHistory
|
||||
import org.xtimms.etsudoku.sections.details.model.HistoryInfo
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.core.model.MangaHistory
|
||||
import org.xtimms.shirizu.sections.details.model.HistoryInfo
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import java.time.Instant
|
||||
|
||||
@Composable
|
||||
@@ -198,7 +198,7 @@ fun Modifier.drawWithLayer(block: ContentDrawScope.() -> Unit) = this.then(
|
||||
@Preview
|
||||
@Composable
|
||||
private fun Preview() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
Row {
|
||||
ReadButton(
|
||||
HistoryInfo(
|
||||
@@ -222,7 +222,7 @@ private fun Preview() {
|
||||
@Preview(name = "Night mode", uiMode = UI_MODE_NIGHT_YES)
|
||||
@Composable
|
||||
private fun PreviewNightMode() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
Row {
|
||||
ReadButton(
|
||||
HistoryInfo(
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -15,9 +15,9 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.etsudoku.utils.lang.toStringPositiveValueOrUnknown
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import org.xtimms.shirizu.utils.lang.toStringPositiveValueOrUnknown
|
||||
|
||||
@Composable
|
||||
fun SmallScoreIndicator(
|
||||
@@ -48,7 +48,7 @@ fun SmallScoreIndicator(
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun SmallScoreIndicatorPreview() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
SmallScoreIndicator(score = 1f)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.animateContentSize
|
||||
import androidx.compose.animation.core.Spring
|
||||
@@ -25,7 +25,7 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.shirizu.R
|
||||
|
||||
@Composable
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.SizeTransform
|
||||
@@ -20,7 +20,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.xtimms.etsudoku.ui.theme.applyOpacity
|
||||
import org.xtimms.shirizu.ui.theme.applyOpacity
|
||||
|
||||
@Composable
|
||||
fun SettingTitle(text: String) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import android.net.Uri
|
||||
import androidx.compose.foundation.clickable
|
||||
@@ -24,8 +24,8 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.core.net.toUri
|
||||
import coil.ImageLoader
|
||||
import org.xtimms.etsudoku.core.AsyncImageImpl
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.shirizu.core.AsyncImageImpl
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
|
||||
@Composable
|
||||
fun SourceItem(
|
||||
@@ -77,7 +77,7 @@ fun SourceItem(
|
||||
@Preview
|
||||
@Composable
|
||||
fun SourceItemPreview() {
|
||||
EtsudokuTheme {
|
||||
ShirizuTheme {
|
||||
SourceItem(
|
||||
coil = ImageLoader(LocalContext.current),
|
||||
faviconUrl = "".toUri(),
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components
|
||||
package org.xtimms.shirizu.core.components
|
||||
|
||||
import android.graphics.Path
|
||||
import android.view.animation.PathInterpolator
|
||||
@@ -84,18 +84,18 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavHostController
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.etsudoku.core.DURATION_ENTER
|
||||
import org.xtimms.etsudoku.core.DURATION_EXIT
|
||||
import org.xtimms.etsudoku.core.initialOffset
|
||||
import org.xtimms.etsudoku.core.toEasing
|
||||
import org.xtimms.etsudoku.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.feed.FEED_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.search.SEARCH_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.settings.SETTINGS_DESTINATION
|
||||
import org.xtimms.etsudoku.sections.shelf.SHELF_DESTINATION
|
||||
import org.xtimms.etsudoku.ui.theme.EtsudokuTheme
|
||||
import org.xtimms.shirizu.R
|
||||
import org.xtimms.shirizu.core.DURATION_ENTER
|
||||
import org.xtimms.shirizu.core.DURATION_EXIT
|
||||
import org.xtimms.shirizu.core.initialOffset
|
||||
import org.xtimms.shirizu.core.toEasing
|
||||
import org.xtimms.shirizu.sections.explore.EXPLORE_DESTINATION
|
||||
import org.xtimms.shirizu.sections.feed.FEED_DESTINATION
|
||||
import org.xtimms.shirizu.sections.history.HISTORY_DESTINATION
|
||||
import org.xtimms.shirizu.sections.search.SEARCH_DESTINATION
|
||||
import org.xtimms.shirizu.sections.settings.SETTINGS_DESTINATION
|
||||
import org.xtimms.shirizu.sections.shelf.SHELF_DESTINATION
|
||||
import org.xtimms.shirizu.ui.theme.ShirizuTheme
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.effects
|
||||
package org.xtimms.shirizu.core.components.effects
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
@@ -22,7 +22,7 @@ import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListUpdateCallback
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.xtimms.etsudoku.core.model.ListModel
|
||||
import org.xtimms.shirizu.core.model.ListModel
|
||||
import java.time.Instant
|
||||
|
||||
enum class RowEntityType { Header, Item }
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.effects
|
||||
package org.xtimms.shirizu.core.components.effects
|
||||
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.RepeatMode
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.icons
|
||||
package org.xtimms.shirizu.core.components.icons
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.icons
|
||||
package org.xtimms.shirizu.core.components.icons
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.icons
|
||||
package org.xtimms.shirizu.core.components.icons
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.components.shape
|
||||
package org.xtimms.shirizu.core.components.shape
|
||||
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Rect
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.xtimms.etsudoku.core.database
|
||||
package org.xtimms.shirizu.core.database
|
||||
|
||||
import android.content.res.Resources
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
import org.koitharu.kotatsu.parsers.model.SortOrder
|
||||
import org.xtimms.etsudoku.R
|
||||
import org.xtimms.shirizu.R
|
||||
|
||||
class DatabasePrePopulateCallback(private val resources: Resources) : RoomDatabase.Callback() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database
|
||||
package org.xtimms.shirizu.core.database
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Database
|
||||
@@ -10,28 +10,28 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.launch
|
||||
import org.xtimms.etsudoku.core.database.dao.BookmarksDao
|
||||
import org.xtimms.etsudoku.core.database.dao.FavouriteCategoriesDao
|
||||
import org.xtimms.etsudoku.core.database.dao.FavouritesDao
|
||||
import org.xtimms.etsudoku.core.database.dao.HistoryDao
|
||||
import org.xtimms.etsudoku.core.database.dao.MangaDao
|
||||
import org.xtimms.etsudoku.core.database.dao.MangaSourcesDao
|
||||
import org.xtimms.etsudoku.core.database.dao.SuggestionDao
|
||||
import org.xtimms.etsudoku.core.database.dao.TagsDao
|
||||
import org.xtimms.etsudoku.core.database.dao.TrackLogsDao
|
||||
import org.xtimms.etsudoku.core.database.dao.TracksDao
|
||||
import org.xtimms.etsudoku.core.database.entity.BookmarkEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.FavouriteCategoryEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.FavouriteEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.HistoryEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaSourceEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaTagsEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.SuggestionEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.TagEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.TrackEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.TrackLogEntity
|
||||
import org.xtimms.etsudoku.utils.lang.processLifecycleScope
|
||||
import org.xtimms.shirizu.core.database.dao.BookmarksDao
|
||||
import org.xtimms.shirizu.core.database.dao.FavouriteCategoriesDao
|
||||
import org.xtimms.shirizu.core.database.dao.FavouritesDao
|
||||
import org.xtimms.shirizu.core.database.dao.HistoryDao
|
||||
import org.xtimms.shirizu.core.database.dao.MangaDao
|
||||
import org.xtimms.shirizu.core.database.dao.MangaSourcesDao
|
||||
import org.xtimms.shirizu.core.database.dao.SuggestionDao
|
||||
import org.xtimms.shirizu.core.database.dao.TagsDao
|
||||
import org.xtimms.shirizu.core.database.dao.TrackLogsDao
|
||||
import org.xtimms.shirizu.core.database.dao.TracksDao
|
||||
import org.xtimms.shirizu.core.database.entity.BookmarkEntity
|
||||
import org.xtimms.shirizu.core.database.entity.FavouriteCategoryEntity
|
||||
import org.xtimms.shirizu.core.database.entity.FavouriteEntity
|
||||
import org.xtimms.shirizu.core.database.entity.HistoryEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaSourceEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaTagsEntity
|
||||
import org.xtimms.shirizu.core.database.entity.SuggestionEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TagEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TrackEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TrackLogEntity
|
||||
import org.xtimms.shirizu.utils.lang.processLifecycleScope
|
||||
|
||||
const val DATABASE_VERSION = 1
|
||||
|
||||
@@ -51,7 +51,7 @@ const val DATABASE_VERSION = 1
|
||||
],
|
||||
version = DATABASE_VERSION
|
||||
)
|
||||
abstract class EtsudokuDatabase : RoomDatabase() {
|
||||
abstract class ShirizuDatabase : RoomDatabase() {
|
||||
|
||||
abstract fun getTagsDao(): TagsDao
|
||||
|
||||
@@ -75,8 +75,8 @@ abstract class EtsudokuDatabase : RoomDatabase() {
|
||||
|
||||
}
|
||||
|
||||
fun EtsudokuDatabase(context: Context): EtsudokuDatabase = Room
|
||||
.databaseBuilder(context, EtsudokuDatabase::class.java, "etsudoku-db")
|
||||
fun ShirizuDatabase(context: Context): ShirizuDatabase = Room
|
||||
.databaseBuilder(context, ShirizuDatabase::class.java, "shirizu-db")
|
||||
.addCallback(DatabasePrePopulateCallback(context.resources))
|
||||
.build()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database
|
||||
package org.xtimms.shirizu.core.database
|
||||
|
||||
const val TABLE_MANGA = "manga"
|
||||
const val TABLE_TAGS = "tags"
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
@@ -7,8 +7,8 @@ import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import androidx.room.Upsert
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.xtimms.etsudoku.core.database.entity.BookmarkEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaWithTags
|
||||
import org.xtimms.shirizu.core.database.entity.BookmarkEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaWithTags
|
||||
|
||||
@Dao
|
||||
abstract class BookmarksDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
@@ -6,7 +6,7 @@ import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import androidx.room.Upsert
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.xtimms.etsudoku.core.database.entity.FavouriteCategoryEntity
|
||||
import org.xtimms.shirizu.core.database.entity.FavouriteCategoryEntity
|
||||
|
||||
@Dao
|
||||
abstract class FavouriteCategoriesDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
@@ -11,10 +11,10 @@ import androidx.sqlite.db.SimpleSQLiteQuery
|
||||
import androidx.sqlite.db.SupportSQLiteQuery
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.xtimms.etsudoku.core.database.entity.FavouriteEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaEntity
|
||||
import org.xtimms.etsudoku.core.model.ListSortOrder
|
||||
import org.xtimms.etsudoku.sections.shelf.FavouriteManga
|
||||
import org.xtimms.shirizu.core.database.entity.FavouriteEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaEntity
|
||||
import org.xtimms.shirizu.core.model.ListSortOrder
|
||||
import org.xtimms.shirizu.sections.shelf.FavouriteManga
|
||||
|
||||
@Dao
|
||||
abstract class FavouritesDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
@@ -10,11 +10,11 @@ import androidx.sqlite.db.SimpleSQLiteQuery
|
||||
import androidx.sqlite.db.SupportSQLiteQuery
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.xtimms.etsudoku.core.database.entity.HistoryEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.HistoryWithManga
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.TagEntity
|
||||
import org.xtimms.etsudoku.core.model.ListSortOrder
|
||||
import org.xtimms.shirizu.core.database.entity.HistoryEntity
|
||||
import org.xtimms.shirizu.core.database.entity.HistoryWithManga
|
||||
import org.xtimms.shirizu.core.database.entity.MangaEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TagEntity
|
||||
import org.xtimms.shirizu.core.model.ListSortOrder
|
||||
|
||||
@Dao
|
||||
abstract class HistoryDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
@@ -8,10 +8,10 @@ import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import androidx.room.Update
|
||||
import androidx.room.Upsert
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaTagsEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaWithTags
|
||||
import org.xtimms.etsudoku.core.database.entity.TagEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaTagsEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaWithTags
|
||||
import org.xtimms.shirizu.core.database.entity.TagEntity
|
||||
|
||||
@Dao
|
||||
abstract class MangaDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Query
|
||||
@@ -9,8 +9,8 @@ import androidx.sqlite.db.SimpleSQLiteQuery
|
||||
import androidx.sqlite.db.SupportSQLiteQuery
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaSourceEntity
|
||||
import org.xtimms.etsudoku.sections.explore.data.SourcesSortOrder
|
||||
import org.xtimms.shirizu.core.database.entity.MangaSourceEntity
|
||||
import org.xtimms.shirizu.sections.explore.data.SourcesSortOrder
|
||||
|
||||
@Dao
|
||||
abstract class MangaSourcesDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
@@ -7,8 +7,8 @@ import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import androidx.room.Update
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.xtimms.etsudoku.core.database.entity.SuggestionEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.SuggestionWithManga
|
||||
import org.xtimms.shirizu.core.database.entity.SuggestionEntity
|
||||
import org.xtimms.shirizu.core.database.entity.SuggestionWithManga
|
||||
|
||||
@Dao
|
||||
abstract class SuggestionDao {
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Query
|
||||
import androidx.room.Upsert
|
||||
import org.xtimms.etsudoku.core.database.entity.TagEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TagEntity
|
||||
|
||||
@Dao
|
||||
abstract class TagsDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
@@ -6,8 +6,8 @@ import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.xtimms.etsudoku.core.database.entity.TrackLogEntity
|
||||
import org.xtimms.etsudoku.core.database.entity.TrackLogWithManga
|
||||
import org.xtimms.shirizu.core.database.entity.TrackLogEntity
|
||||
import org.xtimms.shirizu.core.database.entity.TrackLogWithManga
|
||||
|
||||
@Dao
|
||||
interface TrackLogsDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.dao
|
||||
package org.xtimms.shirizu.core.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.MapColumn
|
||||
@@ -6,8 +6,8 @@ import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import androidx.room.Upsert
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.xtimms.etsudoku.core.database.entity.MangaWithTags
|
||||
import org.xtimms.etsudoku.core.database.entity.TrackEntity
|
||||
import org.xtimms.shirizu.core.database.entity.MangaWithTags
|
||||
import org.xtimms.shirizu.core.database.entity.TrackEntity
|
||||
|
||||
@Dao
|
||||
abstract class TracksDao {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.parsers.model.MangaState
|
||||
@@ -6,14 +6,14 @@ import org.koitharu.kotatsu.parsers.model.MangaTag
|
||||
import org.koitharu.kotatsu.parsers.model.SortOrder
|
||||
import org.koitharu.kotatsu.parsers.util.mapToSet
|
||||
import org.koitharu.kotatsu.parsers.util.toTitleCase
|
||||
import org.xtimms.etsudoku.core.model.Bookmark
|
||||
import org.xtimms.etsudoku.core.model.FavouriteCategory
|
||||
import org.xtimms.etsudoku.core.model.ListSortOrder
|
||||
import org.xtimms.etsudoku.core.model.MangaHistory
|
||||
import org.xtimms.etsudoku.core.model.MangaSource
|
||||
import org.xtimms.etsudoku.core.tracker.model.TrackingLogItem
|
||||
import org.xtimms.etsudoku.sections.shelf.FavouriteManga
|
||||
import org.xtimms.etsudoku.utils.lang.longHashCode
|
||||
import org.xtimms.shirizu.core.model.Bookmark
|
||||
import org.xtimms.shirizu.core.model.FavouriteCategory
|
||||
import org.xtimms.shirizu.core.model.ListSortOrder
|
||||
import org.xtimms.shirizu.core.model.MangaHistory
|
||||
import org.xtimms.shirizu.core.model.MangaSource
|
||||
import org.xtimms.shirizu.core.tracker.model.TrackingLogItem
|
||||
import org.xtimms.shirizu.sections.shelf.FavouriteManga
|
||||
import org.xtimms.shirizu.utils.lang.longHashCode
|
||||
import java.time.Instant
|
||||
|
||||
// Entity to model
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_FAVOURITE_CATEGORIES
|
||||
import org.xtimms.shirizu.core.database.TABLE_FAVOURITE_CATEGORIES
|
||||
|
||||
@Entity(tableName = TABLE_FAVOURITE_CATEGORIES)
|
||||
data class FavouriteCategoryEntity(
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_FAVOURITES
|
||||
import org.xtimms.shirizu.core.database.TABLE_FAVOURITES
|
||||
|
||||
@Entity(
|
||||
tableName = TABLE_FAVOURITES,
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.PrimaryKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_HISTORY
|
||||
import org.xtimms.shirizu.core.database.TABLE_HISTORY
|
||||
|
||||
@Entity(
|
||||
tableName = TABLE_HISTORY,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.Embedded
|
||||
import androidx.room.Junction
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_MANGA
|
||||
import org.xtimms.shirizu.core.database.TABLE_MANGA
|
||||
|
||||
@Entity(tableName = TABLE_MANGA)
|
||||
data class MangaEntity(
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_SOURCES
|
||||
import org.xtimms.shirizu.core.database.TABLE_SOURCES
|
||||
|
||||
@Entity(tableName = TABLE_SOURCES)
|
||||
data class MangaSourceEntity(
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import org.xtimms.etsudoku.core.database.TABLE_MANGA_TAGS
|
||||
import org.xtimms.shirizu.core.database.TABLE_MANGA_TAGS
|
||||
|
||||
@Entity(
|
||||
tableName = TABLE_MANGA_TAGS,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.room.Embedded
|
||||
import androidx.room.Junction
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.xtimms.etsudoku.core.database.entity
|
||||
package org.xtimms.shirizu.core.database.entity
|
||||
|
||||
import androidx.annotation.FloatRange
|
||||
import androidx.room.ColumnInfo
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user