Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,8 @@ class YearInReviewActivity : BaseActivity() {
val screenState = viewModel.uiScreenListState.collectAsState().value
YearInReviewScreenDeck(
state = screenState,
onBackButtonClick = { pagerState ->
if (pagerState.currentPage > 0) {
coroutineScope.launch {
pagerState.animateScrollToPage(pagerState.currentPage - 1)
}
} else {
finish()
}
onBackButtonClick = {
finish()
},
onNextButtonClick = { pagerState ->
coroutineScope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fun YearInReviewScreenDeck(
state: UiState<List<YearInReviewScreenData>>,
onDonateClick: () -> Unit,
onNextButtonClick: (PagerState) -> Unit,
onBackButtonClick: (PagerState) -> Unit
onBackButtonClick: () -> Unit
) {
when (state) {
is UiState.Loading -> {
Expand Down Expand Up @@ -124,11 +124,11 @@ fun YearInReviewScreenDeck(
containerColor = WikipediaTheme.colors.paperColor),
title = { },
navigationIcon = {
IconButton(onClick = { onBackButtonClick(pagerState) }) {
IconButton(onClick = { onBackButtonClick() }) {
Icon(
painter = painterResource(R.drawable.ic_arrow_back_black_24dp),
painter = painterResource(R.drawable.ic_close_black_24dp),
tint = WikipediaTheme.colors.primaryColor,
contentDescription = stringResource(R.string.year_in_review_navigate_left)
contentDescription = stringResource(R.string.year_in_review_close)
)
}
},
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-qq/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@
<string name="year_in_review_get_started">Button text for the Year in Review button Get Started.</string>
<string name="year_in_review_topbar_w_icon">Content description of the W Wikipedia icon for the Year in Review scaffold.</string>
<string name="year_in_review_navigate_left">Content description of the navigation left icon for the Year in Review Scaffold.</string>
<string name="year_in_review_close">Content description of the close button in the Year in Review app bar.</string>
<string name="year_in_review_share_icon">Content description of the share icon for the Year in Review screen scaffold.</string>
<string name="year_in_review_heart_icon">Content description of the heart icon for the Year in Review screen scaffold.</string>
<string name="year_in_review_navigate_right">Content description of the navigate right icon for the Year in Review screen scaffold.</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@
<string name="year_in_review_get_started">Get Started</string>
<string name="year_in_review_topbar_w_icon">Wikipedia W Icon</string>
<string name="year_in_review_navigate_left">Navigate Left</string>
<string name="year_in_review_close">Close</string>
<string name="year_in_review_share_icon">Share Icon</string>
<string name="year_in_review_heart_icon">Heart Icon</string>
<string name="year_in_review_navigate_right">Navigate Right</string>
Expand Down
Loading