Skip to content

Commit

Permalink
- Fixed Details article bug
Browse files Browse the repository at this point in the history
- Refactoring code
- Added event classes for more readable code
  • Loading branch information
muradnajafli committed Mar 27, 2024
1 parent 82b4ea8 commit 0068d2d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.unit.dp
import com.muradnajafli.newscatcher.domain.model.Article
import com.muradnajafli.newscatcher.presentation.common.ArticleItem
import com.muradnajafli.newscatcher.util.DateUtils
import com.muradnajafli.newscatcher.util.LanguageUtils

@Composable
fun BookMarkScreen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ fun HomeScreen(
},
isSearching = searchState.isSearching,
searchResults = searchResults,
navigateToDetails = navigateToDetails,
appLanguage = appLanguage
navigateToDetails = navigateToDetails
)

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.muradnajafli.newscatcher.presentation.home

import android.app.appsearch.SearchResults
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.muradnajafli.newscatcher.R
import com.muradnajafli.newscatcher.data.model.remote.NewsResponse
import com.muradnajafli.newscatcher.domain.model.Article
import com.muradnajafli.newscatcher.domain.usecase.dropdown.ReadLanguageUseCase
import com.muradnajafli.newscatcher.domain.usecase.home.GetLatestHeadlinesUseCase
Expand All @@ -15,7 +13,6 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.launch
import retrofit2.Response
import javax.inject.Inject


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import com.muradnajafli.newscatcher.presentation.common.ArticleItem
@Composable
fun SearchPanel(
searchText: String = "",
appLanguage: String,
onSearchChange: (String) -> Unit,
isSearching: Boolean,
searchResults: List<Article?>,
Expand Down

0 comments on commit 0068d2d

Please sign in to comment.