Skip to content

Commit

Permalink
[1.53.*] Pre-release merge (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
tramline-github[bot] authored Feb 2, 2024
2 parents befb84c + a1fd1fc commit 0da2d77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private typealias AboutPresenterFactory =

private typealias ReaderPresenterFactory =
(
feedLink: String,
postLink: String,
ComponentContext,
goBack: () -> Unit,
) -> ReaderPresenter
Expand Down Expand Up @@ -177,7 +177,7 @@ class AppPresenter(
}
is Config.Reader -> {
Screen.Reader(
presenter = readerPresenter(config.feedLink, componentContext) { navigation.pop() }
presenter = readerPresenter(config.postLink, componentContext) { navigation.pop() }
)
}
}
Expand Down Expand Up @@ -215,6 +215,6 @@ class AppPresenter(

@Parcelize data object About : Config

@Parcelize data class Reader(val feedLink: String) : Config
@Parcelize data class Reader(val postLink: String) : Config
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ internal class DynamicColorState(
}

suspend fun onContentChange(newImages: List<String>) {
if (images.isEmpty()) {
if (!images.containsAll(newImages)) {
images = newImages
}
images.forEach { imageUrl -> fetchDynamicColors(imageUrl) }
Expand All @@ -272,7 +272,6 @@ internal class DynamicColorState(
nextImageUrl: String?,
offset: Float
) {

val previousDynamicColors = previousImageUrl?.let { cache?.get(it) }
val currentDynamicColors = cache?.get(currentImageUrl)
val nextDynamicColors = nextImageUrl?.let { cache?.get(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class HomePresenter(

init {
lifecycle.doOnCreate {
presenterInstance.dispatch(HomeEvent.Init)
backHandler.register(backCallback)
backCallback.isEnabled = state.value.feedsSheetState == BottomSheetValue.Expanded
}
Expand Down Expand Up @@ -146,6 +145,10 @@ class HomePresenter(

val effects = MutableSharedFlow<HomeEffect>()

init {
dispatch(HomeEvent.Init)
}

fun dispatch(event: HomeEvent) {
when (event) {
HomeEvent.Init -> init()
Expand Down

0 comments on commit 0da2d77

Please sign in to comment.