1. 30 Nov, 2016 8 commits
    • akwizgran's avatar
      Merge branch '705-blog-pager-race-conditions' into 'master' · f6d23b4d
      akwizgran authored
      Remove blog pagers
      
      I set out to fix potential race conditions in the blog pagers (the screens you reach by tapping the body of a blog post, that allow you to swipe left and right through the posts in the combined feed or a single blog). The race conditions here are similar to those addressed by !356, but the adapters don't inherit from BriarAdapter so they need to be fixed separately.
      
      While I was looking into this I found a few minor problems with the pagers:
      * The feed pager wasn't responding to events - this was fixed in !398
      * The feed pager finishes NavDrawerActivity when any blog is removed
      * The feed isn't updated when a blog is added (this applies to the list view as well as the pager)
      * Posts aren't removed from the feed pager when a blog is removed
      
      The last problem is quite serious - the feed pager's adapter contains posts that are no longer in the DB, so they'll fail to load. To fix that problem, the adapter needs to be cleared in onStop() and repopulated in onStart(). This is the same approach we use for other adapters where items can be removed from the underlying dataset. Unfortunately, FragmentStatePagerAdapter has some odd behaviour when you clear and repopulate it:
      
      1. When reselecting the previously selected item after clearing and repopulating the adapter, the item slides into view instead of just appearing, which makes it look like you've accidentally swiped.
      2. Items are sometimes duplicated when clearing and repopulating the adapter, so swiping left or right shows another copy of the same post.
      
      These problems only seem to happen if the adapter is cleared - adding new posts works fine on master, although I think there might be some luck involved - FragmentStatePagerAdapter doesn't seem to be designed to support items changing positions.
      
      I spent a lot of time trying to resolve these problems before concluding that maybe it wasn't worth it, and we should just remove the pagers. That's what's currently implemented in this branch. Tapping the body of a post will show the full-length post, but you won't be able to swipe left or right.
      
      The swiping functionality was nice to have, so if you have ideas for fixing the bugs I'd love to hear them. But I'd rather remove this functionality than keep it in a buggy state with no plan for how to fix it.
      
      Closes #705
      
      See merge request !400
      f6d23b4d
    • akwizgran's avatar
      Merge branch '760-integration-tests-for-private-group-invitation-protocol' into 'master' · aa064e85
      akwizgran authored
      Add integration tests for GroupInvitationManager
      
      This MR is based on !433. It adds some integration tests for the private group invitation protocol. One of those tests fails at the moment.
      
      It does not yet cover all corner cases, so it does not fully address #760, but addresses a part of it. Suggestions for more scenarios to test are welcome.
      
      [Wording changed to prevent #760 from being closed automatically based on the description.]
      
      See merge request !434
      aa064e85
    • akwizgran's avatar
      Tightened up test expectations. · 8a139eaf
      akwizgran authored
      8a139eaf
    • akwizgran's avatar
      d51f7315
    • akwizgran's avatar
      Fixed a broken unit test. · 6c90204c
      akwizgran authored
      6c90204c
    • akwizgran's avatar
      Tightened up some tests. · f8266d8a
      akwizgran authored
      f8266d8a
    • akwizgran's avatar
      Fixed a failing test. · f245b047
      akwizgran authored
      f245b047
    • Torsten Grote's avatar
      67d9f3a7
  2. 29 Nov, 2016 7 commits
  3. 28 Nov, 2016 3 commits
  4. 27 Nov, 2016 2 commits
  5. 26 Nov, 2016 1 commit
  6. 23 Nov, 2016 7 commits
  7. 22 Nov, 2016 2 commits
  8. 21 Nov, 2016 10 commits