Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
revert
  • Loading branch information
processprocess committed Jan 7, 2022
commit 07e7782945df5667e1a502cbe490400021369865
13 changes: 6 additions & 7 deletions extensions/amp-story/1.0/pagination-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class PaginationButton {
if (state === this.state_) {
return;
}
// console.log(state);

this.mutator_.mutateElement(this.element, () => {
this.element.classList.remove(this.state_.className);
Expand Down Expand Up @@ -231,12 +230,12 @@ export class PaginationButtons {
if (pageIndex < totalPages - 1) {
this.forwardButton_.updateState(ButtonStates.NEXT_PAGE);
} else {
// const viewer = Services.viewerForDoc(this.ampStory_.element);
// if (viewer.hasCapability('swipe')) {
// this.forwardButton_.updateState(ButtonStates.NEXT_STORY);
// } else {
this.forwardButton_.updateState(ButtonStates.REPLAY);
// }
const viewer = Services.viewerForDoc(this.ampStory_.element);
if (viewer.hasCapability('swipe')) {
this.forwardButton_.updateState(ButtonStates.NEXT_STORY);
} else {
this.forwardButton_.updateState(ButtonStates.REPLAY);
}
}
}

Expand Down