|
@@ -84,7 +84,6 @@ import java.util.Date
|
|
fun MangaScreen(
|
|
fun MangaScreen(
|
|
state: MangaScreenModel.State.Success,
|
|
state: MangaScreenModel.State.Success,
|
|
snackbarHostState: SnackbarHostState,
|
|
snackbarHostState: SnackbarHostState,
|
|
- dateRelativeTime: Int,
|
|
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
dateFormat: DateFormat,
|
|
dateFormat: DateFormat,
|
|
isTabletUi: Boolean,
|
|
isTabletUi: Boolean,
|
|
@@ -141,7 +140,6 @@ fun MangaScreen(
|
|
MangaScreenSmallImpl(
|
|
MangaScreenSmallImpl(
|
|
state = state,
|
|
state = state,
|
|
snackbarHostState = snackbarHostState,
|
|
snackbarHostState = snackbarHostState,
|
|
- dateRelativeTime = dateRelativeTime,
|
|
|
|
dateFormat = dateFormat,
|
|
dateFormat = dateFormat,
|
|
intervalDisplay = intervalDisplay,
|
|
intervalDisplay = intervalDisplay,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
@@ -178,7 +176,6 @@ fun MangaScreen(
|
|
MangaScreenLargeImpl(
|
|
MangaScreenLargeImpl(
|
|
state = state,
|
|
state = state,
|
|
snackbarHostState = snackbarHostState,
|
|
snackbarHostState = snackbarHostState,
|
|
- dateRelativeTime = dateRelativeTime,
|
|
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
dateFormat = dateFormat,
|
|
dateFormat = dateFormat,
|
|
@@ -218,7 +215,6 @@ fun MangaScreen(
|
|
private fun MangaScreenSmallImpl(
|
|
private fun MangaScreenSmallImpl(
|
|
state: MangaScreenModel.State.Success,
|
|
state: MangaScreenModel.State.Success,
|
|
snackbarHostState: SnackbarHostState,
|
|
snackbarHostState: SnackbarHostState,
|
|
- dateRelativeTime: Int,
|
|
|
|
dateFormat: DateFormat,
|
|
dateFormat: DateFormat,
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
@@ -287,9 +283,11 @@ private fun MangaScreenSmallImpl(
|
|
}
|
|
}
|
|
val animatedTitleAlpha by animateFloatAsState(
|
|
val animatedTitleAlpha by animateFloatAsState(
|
|
if (firstVisibleItemIndex > 0) 1f else 0f,
|
|
if (firstVisibleItemIndex > 0) 1f else 0f,
|
|
|
|
+ label = "titleAlpha",
|
|
)
|
|
)
|
|
val animatedBgAlpha by animateFloatAsState(
|
|
val animatedBgAlpha by animateFloatAsState(
|
|
if (firstVisibleItemIndex > 0 || firstVisibleItemScrollOffset > 0) 1f else 0f,
|
|
if (firstVisibleItemIndex > 0 || firstVisibleItemScrollOffset > 0) 1f else 0f,
|
|
|
|
+ label = "bgAlpha",
|
|
)
|
|
)
|
|
MangaToolbar(
|
|
MangaToolbar(
|
|
title = state.manga.title,
|
|
title = state.manga.title,
|
|
@@ -430,7 +428,6 @@ private fun MangaScreenSmallImpl(
|
|
sharedChapterItems(
|
|
sharedChapterItems(
|
|
manga = state.manga,
|
|
manga = state.manga,
|
|
chapters = chapters,
|
|
chapters = chapters,
|
|
- dateRelativeTime = dateRelativeTime,
|
|
|
|
dateFormat = dateFormat,
|
|
dateFormat = dateFormat,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
@@ -449,7 +446,6 @@ private fun MangaScreenSmallImpl(
|
|
fun MangaScreenLargeImpl(
|
|
fun MangaScreenLargeImpl(
|
|
state: MangaScreenModel.State.Success,
|
|
state: MangaScreenModel.State.Success,
|
|
snackbarHostState: SnackbarHostState,
|
|
snackbarHostState: SnackbarHostState,
|
|
- dateRelativeTime: Int,
|
|
|
|
dateFormat: DateFormat,
|
|
dateFormat: DateFormat,
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
intervalDisplay: () -> Pair<Int, Int>?,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
@@ -655,7 +651,6 @@ fun MangaScreenLargeImpl(
|
|
sharedChapterItems(
|
|
sharedChapterItems(
|
|
manga = state.manga,
|
|
manga = state.manga,
|
|
chapters = chapters,
|
|
chapters = chapters,
|
|
- dateRelativeTime = dateRelativeTime,
|
|
|
|
dateFormat = dateFormat,
|
|
dateFormat = dateFormat,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeStartAction = chapterSwipeStartAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
chapterSwipeEndAction = chapterSwipeEndAction,
|
|
@@ -717,7 +712,6 @@ private fun SharedMangaBottomActionMenu(
|
|
private fun LazyListScope.sharedChapterItems(
|
|
private fun LazyListScope.sharedChapterItems(
|
|
manga: Manga,
|
|
manga: Manga,
|
|
chapters: List<ChapterItem>,
|
|
chapters: List<ChapterItem>,
|
|
- dateRelativeTime: Int,
|
|
|
|
dateFormat: DateFormat,
|
|
dateFormat: DateFormat,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
chapterSwipeStartAction: LibraryPreferences.ChapterSwipeAction,
|
|
chapterSwipeEndAction: LibraryPreferences.ChapterSwipeAction,
|
|
chapterSwipeEndAction: LibraryPreferences.ChapterSwipeAction,
|
|
@@ -746,11 +740,7 @@ private fun LazyListScope.sharedChapterItems(
|
|
date = chapterItem.chapter.dateUpload
|
|
date = chapterItem.chapter.dateUpload
|
|
.takeIf { it > 0L }
|
|
.takeIf { it > 0L }
|
|
?.let {
|
|
?.let {
|
|
- Date(it).toRelativeString(
|
|
|
|
- context,
|
|
|
|
- dateRelativeTime,
|
|
|
|
- dateFormat,
|
|
|
|
- )
|
|
|
|
|
|
+ Date(it).toRelativeString(context, dateFormat)
|
|
},
|
|
},
|
|
readProgress = chapterItem.chapter.lastPageRead
|
|
readProgress = chapterItem.chapter.lastPageRead
|
|
.takeIf { !chapterItem.chapter.read && it > 0L }
|
|
.takeIf { !chapterItem.chapter.read && it > 0L }
|