From 53df9c7d5e4033d300f0298e18626baae728aade Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Thu, 18 Apr 2024 13:15:05 +0530 Subject: [PATCH 1/2] Fix refresh indicator padding top --- .../kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt index 9437cd6eb..739998df1 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt @@ -33,7 +33,6 @@ import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.requiredHeight import androidx.compose.foundation.layout.requiredSize -import androidx.compose.foundation.layout.statusBars import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.lazy.LazyListState @@ -305,7 +304,7 @@ private fun HomeScreenContent( PullRefreshIndicator( refreshing = state.isRefreshing, state = swipeRefreshState, - modifier = Modifier.windowInsetsPadding(WindowInsets.statusBars).align(Alignment.TopCenter) + modifier = Modifier.align(Alignment.TopCenter) ) } } From 544291f8ee2c94a067c0774a329ed5b62242b2ea Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Thu, 18 Apr 2024 13:15:51 +0530 Subject: [PATCH 2/2] Skip featured posts observer updates in home presenter if there are no changes --- .../kotlin/dev/sasikanth/rss/reader/home/HomePresenter.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/HomePresenter.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/HomePresenter.kt index 9343b9667..651931ed4 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/HomePresenter.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/HomePresenter.kt @@ -269,6 +269,7 @@ class HomePresenter( after = postsAfter ) } + .distinctUntilChanged() .onEach { featuredPosts -> val featuredPostIds = featuredPosts.map { it.id } val postsType = _state.value.postsType