diff --git a/app/src/main/java/com/muradnajafli/newscatcher/MainActivity.kt b/app/src/main/java/com/muradnajafli/newscatcher/MainActivity.kt index 02e6061..a60625a 100644 --- a/app/src/main/java/com/muradnajafli/newscatcher/MainActivity.kt +++ b/app/src/main/java/com/muradnajafli/newscatcher/MainActivity.kt @@ -3,13 +3,6 @@ package com.muradnajafli.newscatcher import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.ui.Modifier -import androidx.navigation.compose.NavHost -import com.muradnajafli.newscatcher.domain.model.Article -import com.muradnajafli.newscatcher.ui.bookmark.BookMarkScreen import com.muradnajafli.newscatcher.ui.navigation.NewsNavigator import com.muradnajafli.newscatcher.ui.theme.NewsCatcherTheme import dagger.hilt.android.AndroidEntryPoint diff --git a/app/src/main/java/com/muradnajafli/newscatcher/data/repository/local/SavedNewsRepositoryImpl.kt b/app/src/main/java/com/muradnajafli/newscatcher/data/repository/local/SavedNewsRepositoryImpl.kt index 2b9428c..6d85cb6 100644 --- a/app/src/main/java/com/muradnajafli/newscatcher/data/repository/local/SavedNewsRepositoryImpl.kt +++ b/app/src/main/java/com/muradnajafli/newscatcher/data/repository/local/SavedNewsRepositoryImpl.kt @@ -4,7 +4,6 @@ import com.muradnajafli.newscatcher.data.room.SavedNewsDao import com.muradnajafli.newscatcher.domain.model.Article import com.muradnajafli.newscatcher.domain.repository.local.SavedNewsRepository import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.onEach import javax.inject.Inject class SavedNewsRepositoryImpl @Inject constructor( diff --git a/app/src/main/java/com/muradnajafli/newscatcher/data/retrofit/NewsApi.kt b/app/src/main/java/com/muradnajafli/newscatcher/data/retrofit/NewsApi.kt index 1b277d8..cfc17fd 100644 --- a/app/src/main/java/com/muradnajafli/newscatcher/data/retrofit/NewsApi.kt +++ b/app/src/main/java/com/muradnajafli/newscatcher/data/retrofit/NewsApi.kt @@ -3,7 +3,6 @@ package com.muradnajafli.newscatcher.data.retrofit import com.muradnajafli.newscatcher.data.model.remote.NewsResponse import retrofit2.Response import retrofit2.http.GET -import retrofit2.http.Path import retrofit2.http.Query interface NewsApi { diff --git a/app/src/main/java/com/muradnajafli/newscatcher/ui/bookmark/BookmarkState.kt b/app/src/main/java/com/muradnajafli/newscatcher/ui/bookmark/BookmarkState.kt deleted file mode 100644 index 8583b77..0000000 --- a/app/src/main/java/com/muradnajafli/newscatcher/ui/bookmark/BookmarkState.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.muradnajafli.newscatcher.ui.bookmark - -import com.muradnajafli.newscatcher.domain.model.Article - -data class BookmarkState( - val articles: List
-) diff --git a/app/src/main/java/com/muradnajafli/newscatcher/ui/detail/DetailScreen.kt b/app/src/main/java/com/muradnajafli/newscatcher/ui/detail/DetailScreen.kt index 732a4e2..f7694db 100644 --- a/app/src/main/java/com/muradnajafli/newscatcher/ui/detail/DetailScreen.kt +++ b/app/src/main/java/com/muradnajafli/newscatcher/ui/detail/DetailScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -18,19 +17,11 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip @@ -41,10 +32,8 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow -import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.lifecycle.compose.collectAsStateWithLifecycle import coil.compose.AsyncImage import com.muradnajafli.newscatcher.R import com.muradnajafli.newscatcher.domain.model.Article @@ -229,52 +218,6 @@ fun DetailsScreen( } } ) - } - } -} - -//@Composable -//@Preview(showBackground = true) -//fun DetailsScreenPreview() { -// DetailsScreen( -// topic = "Topic", -// title = "Factbox: Who is still buying Russian crude oil?", -// author = "Jennifer Wars", -// excerpt = "Australia, Britain, Canada and the United States have imposed outright bans on Russian oil purchases following Moscow's invasion of Ukraine, but members of the European Union are split.", -// summary = "(Reuters) - Australia, Britain, Canada and the United States have imposed outright bans on Russian oil purchases following Moscow's invasion of Ukraine, but members of the European Union are split.EU foreign ministers failed to agree on Monday on sanctioning Russian gas and oil supplies, which account for 40% and 27% of the bloc's total use of those commodities respectively.Germany, the EU's top user of Russian crude oil and the Netherlands, a key trading hub, argue that the EU couldn't cut its dependence on Russian supplies overnight.", -// link = "https://www.reuters.com/business/energy/factbox-who-is-still-buying-russian-crude-oil-2022-03-01/", -// media = "https://www.reuters.com/business/energy/factbox-who-is-still-buying-russian-crude-oil-2022-03-01/", -// publishedDate = "2022-03-01", -// onSaveButtonClicked = { -// SavedNews( -// tableId = 0, -// topic = "Topic", -// title = "Factbox: Who is still buying Russian crude oil?", -// media = "https://www.reuters.com/business/energy/factbox-who-is-still-buying-russian-crude-oil-2022-03-01/", -// publishedDate = "2022-03-01" -// ) -// } -// ) -//} - -//@Preview(showBackground = true) -//@Composable -//fun DetailsScreenPreview() { -// -// DetailsScreen( -// article = Article( -// author = "Murad", -// title = "Coinbase says Apple blocked its last app release on NFTs in Wallet ... - CryptoSaurus", -// topic = "Coinbase", -// excerpt = "Coinbase says Apple blocked its last app release on NFTs in Wallet ... - CryptoSaurus", -// summary = "Coinbase says Apple blocked its last app release on NFTs in Wallet ... - CryptoSaurus", -// publishedDate = "2023-06-16T22:24:33Z", -// link = "https://consent.google.com/ml?continue=https://news.google.com/rss/articles/CBMiaWh0dHBzOi8vY3J5cHRvc2F1cnVzLnRlY2gvY29pbmJhc2Utc2F5cy1hcHBsZS1ibG9ja2VkLWl0cy1sYXN0LWFwcC1yZWxlYXNlLW9uLW5mdHMtaW4td2FsbGV0LXJldXRlcnMtY29tL9IBAA?oc%3D5&gl=FR&hl=en-US&cm=2&pc=n&src=1", -// media = "https://media.wired.com/photos/6495d5e893ba5cd8bbdc95af/191:100/w_1280,c_limit/The-EU-Rules-Phone-Batteries-Must-Be-Replaceable-Gear-2BE6PRN.jpg" -// ) -// ) { -// -// } -//} \ No newline at end of file +} \ No newline at end of file