Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorKabata committed Sep 25, 2024
1 parent 408b5de commit 7c715e2
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BasePagingSource<T : Any>(val fetchData: suspend (page: Int) -> List<T>?)
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, T> {
val page = params.key ?: STARTING_PAGE_INDEX

val data = fetchData(page)?: emptyList()
val data = fetchData(page) ?: emptyList()

return try {
LoadResult.Page(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package com.vickbt.composeApp.domain.repositories

import app.cash.paging.PagingData
import com.vickbt.composeApp.domain.models.Movie
import com.vickbt.composeApp.domain.utils.Constants.STARTING_PAGE_INDEX
import kotlinx.coroutines.flow.Flow

interface SearchRepository {

// Search movie from network source
suspend fun searchMovie(movieName: String, ): Result<Flow<PagingData<Movie>>>
suspend fun searchMovie(movieName: String): Result<Flow<PagingData<Movie>>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fun MovieCardPortraitCompact(

Text(
modifier = Modifier.width(145.dp),
text = movie.title?: stringResource(Res.string.unknown_movie),
text = movie.title ?: stringResource(Res.string.unknown_movie),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface,
fontSize = 14.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import com.vickbt.shared.resources.upcoming_movies
import org.jetbrains.compose.resources.stringResource
import org.koin.compose.viewmodel.koinViewModel


@OptIn(ExperimentalFoundationApi::class)
@Composable
fun HomeScreen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ fun SearchScreen(
verticalArrangement = Arrangement.spacedBy(8.dp),
contentPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp)
) {

items(searchResults.itemCount) { index ->
searchResults[index]?.let { movies ->
MovieCardPortrait(
Expand Down

0 comments on commit 7c715e2

Please sign in to comment.