diff --git a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt index c56366952..f89a2bd2c 100644 --- a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt +++ b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt @@ -24,6 +24,7 @@ import coil.imageLoader import coil.request.ImageRequest import coil.request.SuccessResult import coil.size.Scale +import dev.sasikanth.rss.reader.components.image.ImageLoader import dev.sasikanth.rss.reader.di.scopes.AppScope import me.tatarka.inject.annotations.Inject diff --git a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt index 7db33b847..d8e1d42d1 100644 --- a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt +++ b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt @@ -16,7 +16,7 @@ package dev.sasikanth.rss.reader.di import dev.sasikanth.rss.reader.components.AndroidImageLoader -import dev.sasikanth.rss.reader.components.ImageLoader +import dev.sasikanth.rss.reader.components.image.ImageLoader import me.tatarka.inject.annotations.Provides actual interface ImageLoaderComponent { diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/app/App.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/app/App.kt index 5c2643b4a..209a63c70 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/app/App.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/app/App.kt @@ -22,17 +22,15 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue -import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import com.arkivanov.decompose.extensions.compose.jetbrains.stack.Children import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimation -import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.plus import com.arkivanov.essenty.backhandler.BackHandler import dev.sasikanth.rss.reader.bookmarks.ui.BookmarksScreen import dev.sasikanth.rss.reader.components.DynamicContentTheme -import dev.sasikanth.rss.reader.components.ImageLoader import dev.sasikanth.rss.reader.components.LocalDynamicColorState -import dev.sasikanth.rss.reader.components.LocalImageLoader +import dev.sasikanth.rss.reader.components.image.ImageLoader +import dev.sasikanth.rss.reader.components.image.LocalImageLoader import dev.sasikanth.rss.reader.components.rememberDynamicColorState import dev.sasikanth.rss.reader.home.ui.HomeScreen import dev.sasikanth.rss.reader.repository.BrowserType diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/DynamicContentTheme.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/DynamicContentTheme.kt index 45c19dc9b..36afde253 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/DynamicContentTheme.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/DynamicContentTheme.kt @@ -39,6 +39,7 @@ import dev.sasikanth.material.color.utilities.quantize.QuantizerCelebi import dev.sasikanth.material.color.utilities.scheme.DynamicScheme import dev.sasikanth.material.color.utilities.scheme.SchemeContent import dev.sasikanth.material.color.utilities.score.Score +import dev.sasikanth.rss.reader.components.image.ImageLoader import dev.sasikanth.rss.reader.ui.AppTheme import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/AsyncImage.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/AsyncImage.kt similarity index 95% rename from shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/AsyncImage.kt rename to shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/AsyncImage.kt index 75507f553..60db64b73 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/AsyncImage.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/AsyncImage.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package dev.sasikanth.rss.reader.components +package dev.sasikanth.rss.reader.components.image import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box @@ -27,9 +27,9 @@ import androidx.compose.ui.unit.IntSize fun AsyncImage( url: String, contentDescription: String?, - contentScale: ContentScale = ContentScale.Fit, - size: IntSize? = null, modifier: Modifier = Modifier, + contentScale: ContentScale = ContentScale.Fit, + size: IntSize? = null ) { Box(modifier) { val imageState by rememberImageLoaderState(url, size) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/ImageLoader.kt similarity index 97% rename from shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt rename to shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/ImageLoader.kt index d4dac9584..6629d0f28 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/ImageLoader.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/components/image/ImageLoader.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package dev.sasikanth.rss.reader.components +package dev.sasikanth.rss.reader.components.image import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/di/SharedApplicationComponent.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/di/SharedApplicationComponent.kt index 625a7715e..bc84f4bae 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/di/SharedApplicationComponent.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/di/SharedApplicationComponent.kt @@ -15,7 +15,7 @@ */ package dev.sasikanth.rss.reader.di -import dev.sasikanth.rss.reader.components.ImageLoader +import dev.sasikanth.rss.reader.components.image.ImageLoader import dev.sasikanth.rss.reader.di.scopes.AppScope import dev.sasikanth.rss.reader.initializers.Initializer import dev.sasikanth.rss.reader.network.NetworkComponent diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/BottomSheetItem.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/BottomSheetItem.kt index 6bb3d2c1a..2de2fe3c2 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/BottomSheetItem.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/BottomSheetItem.kt @@ -32,7 +32,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Text import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip @@ -40,7 +39,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import dev.sasikanth.rss.reader.components.AsyncImage +import dev.sasikanth.rss.reader.components.image.AsyncImage import dev.sasikanth.rss.reader.ui.AppTheme import dev.sasikanth.rss.reader.ui.bottomSheetItemLabel import dev.sasikanth.rss.reader.utils.inverseProgress diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/FeedListItem.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/FeedListItem.kt index 5cbd46c48..20caa2c88 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/FeedListItem.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/feeds/ui/FeedListItem.kt @@ -53,7 +53,7 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.unit.dp -import dev.sasikanth.rss.reader.components.AsyncImage +import dev.sasikanth.rss.reader.components.image.AsyncImage import dev.sasikanth.rss.reader.feeds.ui.FeedsSheetMode.* import dev.sasikanth.rss.reader.models.local.Feed import dev.sasikanth.rss.reader.resources.icons.Delete diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedPostItem.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedPostItem.kt index d6528c643..de4ce169f 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedPostItem.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedPostItem.kt @@ -37,7 +37,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import dev.sasikanth.rss.reader.components.AsyncImage +import dev.sasikanth.rss.reader.components.image.AsyncImage import dev.sasikanth.rss.reader.models.local.PostWithMetadata import dev.sasikanth.rss.reader.ui.AppTheme import dev.sasikanth.rss.reader.utils.LocalWindowSizeClass diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt index c9f9e9a0b..b2e176a0f 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt @@ -34,8 +34,6 @@ import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.ReadOnlyComposable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -52,8 +50,8 @@ import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp import androidx.compose.ui.util.fastForEachReversed import androidx.compose.ui.util.lerp -import dev.sasikanth.rss.reader.components.AsyncImage import dev.sasikanth.rss.reader.components.LocalDynamicColorState +import dev.sasikanth.rss.reader.components.image.AsyncImage import dev.sasikanth.rss.reader.models.local.PostWithMetadata import dev.sasikanth.rss.reader.ui.AppTheme import dev.sasikanth.rss.reader.utils.LocalWindowSizeClass diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/PostList.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/PostList.kt index a817fd54d..4c1d9d5f8 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/PostList.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/PostList.kt @@ -46,7 +46,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.unit.dp import app.cash.paging.compose.LazyPagingItems -import dev.sasikanth.rss.reader.components.AsyncImage +import dev.sasikanth.rss.reader.components.image.AsyncImage import dev.sasikanth.rss.reader.models.local.Feed import dev.sasikanth.rss.reader.models.local.PostWithMetadata import dev.sasikanth.rss.reader.ui.AppTheme diff --git a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/components/IOSImageLoader.kt b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/components/IOSImageLoader.kt index 7a88f08bc..67b0bd308 100644 --- a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/components/IOSImageLoader.kt +++ b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/components/IOSImageLoader.kt @@ -20,6 +20,7 @@ package dev.sasikanth.rss.reader.components import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asComposeImageBitmap import androidx.compose.ui.unit.IntSize +import dev.sasikanth.rss.reader.components.image.ImageLoader import dev.sasikanth.rss.reader.di.scopes.AppScope import io.ktor.client.HttpClient import io.ktor.client.engine.darwin.Darwin diff --git a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt index 3886c7679..0ae3deba2 100644 --- a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt +++ b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/di/ImageLoaderComponent.kt @@ -16,7 +16,7 @@ package dev.sasikanth.rss.reader.di import dev.sasikanth.rss.reader.components.IOSImageLoader -import dev.sasikanth.rss.reader.components.ImageLoader +import dev.sasikanth.rss.reader.components.image.ImageLoader import me.tatarka.inject.annotations.Provides actual interface ImageLoaderComponent {