Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add canResetTimeline callback and thread it through to TimelinePanel #768

Merged
merged 2 commits into from Mar 22, 2017

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Mar 22, 2017

Also unregister UploadBar listener. Requires matrix-org/matrix-js-sdk#395 for MatrixClient.setCanResetTimelineCallback.

Tested by receiving >20 messages whilst offline and:

  • Being scrolled to the bottom (verifying with console logs that TimelinePanel returns true)
  • Being scrolled up a bit (verifying with console logs that TimelinePanel returns false)
  • Not being in that room.

@kegsay
Copy link
Member Author

kegsay commented Mar 22, 2017

Tests are likely failing due to them missing the required JS SDK function.

// https://github.com/vector-im/riot-web/issues/3307#issuecomment-282895568
cli.setCanResetTimelineCallback(function(roomId) {
console.log("Request to reset timeline in room ", roomId, " viewing:", self.state.currentRoomId);
if (roomId !== self.state.currentRoomId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logically, this belongs in loggedInView, but it's ok here I guess

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine.

@richvdh richvdh assigned kegsay and unassigned richvdh Mar 22, 2017
@kegsay kegsay merged commit 3d71cb8 into develop Mar 22, 2017
martindale pushed a commit to FabricLabs/matrix-react-sdk that referenced this pull request Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants