-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
3,020 additions
and
2,734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
2,601 changes: 1,342 additions & 1,259 deletions
2,601
app/src/main/baselineProfiles/baseline-prof.txt
Large diffs are not rendered by default.
Oops, something went wrong.
2,601 changes: 1,342 additions & 1,259 deletions
2,601
app/src/main/baselineProfiles/startup-prof.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
app/src/main/java/com/rob729/newsfeed/model/state/home/HomeFeedSideEffect.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.rob729.newsfeed.model.state.home | ||
|
||
sealed class HomeFeedSideEffect { | ||
data class HomeSourceClicked(val domain: String) : HomeFeedSideEffect() | ||
data class HomeFeedItemClicked(val selectedItemUrl: String) : HomeFeedSideEffect() | ||
data object HomeSourceFabClicked : HomeFeedSideEffect() | ||
data class NewsSourceClicked(val domain: String) : HomeFeedSideEffect() | ||
data class FeedItemClicked(val selectedItemUrl: String) : HomeFeedSideEffect() | ||
data object NewsSourceFabClicked : HomeFeedSideEffect() | ||
data object ScrollToTopClicked : HomeFeedSideEffect() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/rob729/newsfeed/ui/bottomSheet/NewsSourceBottomSheet.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.rob729.newsfeed.ui.bottomSheet | ||
|
||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheet | ||
import androidx.compose.material3.SheetState | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.ExperimentalComposeUiApi | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.platform.testTag | ||
import androidx.compose.ui.semantics.semantics | ||
import androidx.compose.ui.semantics.testTagsAsResourceId | ||
import com.rob729.newsfeed.ui.components.NewsSourceBottomSheetContent | ||
|
||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class) | ||
@Composable | ||
fun NewsSourceBottomSheet( | ||
bottomSheetState: SheetState, | ||
isBottomSheetVisible: Boolean, | ||
onNewsSourceClicked: (String) -> Unit, | ||
selectedNewsSource: String, | ||
onDismissRequest: () -> Unit | ||
) { | ||
|
||
if (isBottomSheetVisible) { | ||
ModalBottomSheet( | ||
modifier = Modifier.semantics { testTagsAsResourceId = true }, | ||
sheetState = bottomSheetState, | ||
scrimColor = Color.Black.copy(alpha = 0.6f), | ||
onDismissRequest = onDismissRequest | ||
) { | ||
NewsSourceBottomSheetContent( | ||
onNewsSourceClicked = onNewsSourceClicked, | ||
currentSelectedNewsSource = selectedNewsSource | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.