diff --git a/app/src/main/java/eu/kanade/data/DatabaseAdapter.kt b/app/src/main/java/eu/kanade/data/DatabaseAdapter.kt index 445428b8b..d51e2c514 100644 --- a/app/src/main/java/eu/kanade/data/DatabaseAdapter.kt +++ b/app/src/main/java/eu/kanade/data/DatabaseAdapter.kt @@ -1,7 +1,7 @@ package eu.kanade.data import com.squareup.sqldelight.ColumnAdapter -import java.util.* +import java.util.Date val dateAdapter = object : ColumnAdapter { override fun decode(databaseValue: Long): Date = Date(databaseValue) diff --git a/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt b/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt index ff94b1d61..e7ebf5cb4 100644 --- a/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt +++ b/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt @@ -2,7 +2,7 @@ package eu.kanade.data.history import eu.kanade.domain.history.model.History import eu.kanade.domain.history.model.HistoryWithRelations -import java.util.* +import java.util.Date val historyMapper: (Long, Long, Date?, Date?) -> History = { id, chapterId, readAt, _ -> History( diff --git a/app/src/main/java/eu/kanade/domain/history/model/History.kt b/app/src/main/java/eu/kanade/domain/history/model/History.kt index b0ba50695..58c1c985e 100644 --- a/app/src/main/java/eu/kanade/domain/history/model/History.kt +++ b/app/src/main/java/eu/kanade/domain/history/model/History.kt @@ -1,6 +1,6 @@ package eu.kanade.domain.history.model -import java.util.* +import java.util.Date data class History( val id: Long?, diff --git a/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt b/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt index 5faa8eb24..6f5a8e1fc 100644 --- a/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt +++ b/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt @@ -1,6 +1,6 @@ package eu.kanade.domain.history.model -import java.util.* +import java.util.Date data class HistoryWithRelations( val id: Long, diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt b/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt index 54c43e3f1..a290091f6 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt @@ -6,8 +6,8 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import java.text.Collator -import java.util.* -import kotlin.Comparator +import java.util.Collections +import java.util.Locale class GetSourcesWithFavoriteCount( private val repository: SourceRepository, diff --git a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt index 4523d1c77..a9ebb4cd2 100644 --- a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt @@ -2,14 +2,32 @@ package eu.kanade.presentation.history import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBars +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.selection.toggleable import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Delete -import androidx.compose.material3.* -import androidx.compose.runtime.* +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Checkbox +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.NestedScrollConnection @@ -37,7 +55,7 @@ import uy.kohesive.injekt.api.get import java.text.DateFormat import java.text.DecimalFormat import java.text.DecimalFormatSymbols -import java.util.* +import java.util.Date @Composable fun HistoryScreen( @@ -88,6 +106,7 @@ fun HistoryContent( LazyColumn( modifier = Modifier .nestedScroll(nestedScroll), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), state = scrollState, ) { items(history) { item -> @@ -114,9 +133,6 @@ fun HistoryContent( null -> {} } } - item { - Spacer(Modifier.navigationBarsPadding()) - } } if (removeState != null) { diff --git a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt index 9ceade06d..b91dd8d78 100644 --- a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt @@ -1,5 +1,8 @@ package eu.kanade.presentation.more +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.CloudOff @@ -43,6 +46,7 @@ fun MoreScreen( LazyColumn( modifier = Modifier.nestedScroll(nestedScrollInterop), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), ) { item { LogoHeader() diff --git a/app/src/main/java/eu/kanade/presentation/more/about/AboutScreen.kt b/app/src/main/java/eu/kanade/presentation/more/about/AboutScreen.kt index 6850d4466..c74f41355 100644 --- a/app/src/main/java/eu/kanade/presentation/more/about/AboutScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/about/AboutScreen.kt @@ -2,7 +2,10 @@ package eu.kanade.presentation.more.about import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Public @@ -36,6 +39,7 @@ fun AboutScreen( LazyColumn( modifier = Modifier.nestedScroll(nestedScrollInterop), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), ) { item { LogoHeader() diff --git a/app/src/main/java/eu/kanade/presentation/more/about/LicensesScreen.kt b/app/src/main/java/eu/kanade/presentation/more/about/LicensesScreen.kt index 374c22e03..3645daea5 100644 --- a/app/src/main/java/eu/kanade/presentation/more/about/LicensesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/about/LicensesScreen.kt @@ -1,6 +1,9 @@ package eu.kanade.presentation.more.about +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.navigationBars import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -17,6 +20,7 @@ fun LicensesScreen( modifier = Modifier .fillMaxSize() .nestedScroll(nestedScrollInterop), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), colors = LibraryDefaults.libraryColors( backgroundColor = MaterialTheme.colorScheme.background, contentColor = MaterialTheme.colorScheme.onBackground, diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/SettingsMainScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/SettingsMainScreen.kt index 111561537..c33070b3d 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/SettingsMainScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/SettingsMainScreen.kt @@ -1,6 +1,9 @@ package eu.kanade.presentation.more.settings import androidx.annotation.StringRes +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -17,6 +20,7 @@ fun SettingsMainScreen( ) { LazyColumn( modifier = Modifier.nestedScroll(nestedScrollInterop), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), ) { sections.map { item { diff --git a/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt b/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt index d300ad507..8e577af07 100644 --- a/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt @@ -1,5 +1,8 @@ package eu.kanade.presentation.source +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material3.Checkbox @@ -57,7 +60,8 @@ fun SourceFilterContent( return } LazyColumn( - modifier = Modifier.nestedScroll(nestedScrollInterop) + modifier = Modifier.nestedScroll(nestedScrollInterop), + contentPadding = WindowInsets.navigationBars.asPaddingValues(), ) { items( items = items, diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt index 971cf1d34..4ce5be254 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt @@ -19,7 +19,6 @@ import kotlinx.serialization.json.decodeFromJsonElement import kotlinx.serialization.json.decodeFromStream import kotlinx.serialization.json.intOrNull import kotlinx.serialization.json.jsonPrimitive -import okio.source import java.util.Date class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBackupRestore(context, notifier) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index f0a925e19..562c68dbb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -31,7 +31,6 @@ import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.text.Collator import java.util.Collections -import java.util.Comparator import java.util.Locale /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt index eff06438c..7fd31dfa5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt @@ -25,7 +25,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.update import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -import java.util.* +import java.util.Date /** * Presenter of HistoryFragment. diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt index 9ab0bc115..0cd50e5b7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt @@ -17,6 +17,7 @@ import dev.chrisbanes.insetter.applyInsetter import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.databinding.ActionToolbarBinding import eu.kanade.tachiyomi.util.system.applySystemAnimatorScale +import eu.kanade.tachiyomi.widget.ActionModeWithToolbar.Callback import eu.kanade.tachiyomi.widget.listener.SimpleAnimationListener /**