Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

scroll to refresh even when already at top of list, fix #1588 #1593

Merged
merged 2 commits into from
Aug 1, 2016

Conversation

jancborchardt
Copy link
Contributor

Please review my beginner Backbone code :D @ChristophWurst @Gomez

At least from testing it seems to work fine, no glitches seen yet.

@mention-bot
Copy link

@jancborchardt, thanks for your PR! By analyzing the annotation information on this pull request, we identified @ChristophWurst and @Gomez to be potential reviewers

@jancborchardt
Copy link
Contributor Author

Yo @owncloud/mail folks, review this awesome JS hacking I brought into the world. ;D

@Gomez
Copy link
Contributor

Gomez commented Jul 31, 2016

I don't get it. How to refresh? Before and after this PR?

@jancborchardt
Copy link
Contributor Author

  • Before: When at the top, scroll down in the message list a tiny bit and then up again til you reach the top again.
  • After: When at the top, just try scroll up more.

It's like pull to refresh on mobile.

@ChristophWurst
Copy link
Contributor

👎 this triggers 💯s of requests to check messages. We need to debounce the event somehow, let me fix this

@ChristophWurst
Copy link
Contributor

should be good now, please test it @jancborchardt

The only issue left is that it sometimes also reloads if one scrolls down. I assume the scroll event also fires with top === 0. Maybe we have to store the last scroll position to distinguish the direction. Could be fixed in another PR.

@jancborchardt
Copy link
Contributor Author

Nice! 👍

@jancborchardt jancborchardt merged commit cc2287a into master Aug 1, 2016
@jancborchardt jancborchardt deleted the scroll-to-refresh branch August 1, 2016 18:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants