Skip to content
Snippets Groups Projects
  1. Oct 26, 2016
  2. Oct 25, 2016
  3. Oct 21, 2016
    • akwizgran's avatar
      Merge branch '705-adapter-revisions' into 'master' · df44015c
      akwizgran authored
      Fix race conditions when updating UI from events (again)
      
      This is my second attempt at fixing race conditions caused by updating the UI from events while background tasks are loading data from the DB. Unlike my first attempt, this one is pretty simple and doesn't require too much reasoning about possible races.
      
      The first commit fixes a few list loading bugs I found while working on this problem, and moves the lifecycle callbacks from resume/pause to start/stop, closing #609. The second commit contains the fix for #705, which works as follows:
      
      * Each BriarAdapter has a revision counter
      * Before making a change to the adapter that could be overwritten by a background task, increment the revision
      * Before starting a background task that could overwrite other changes, get the current revision
      * Before applying changes from a background task that could overwrite other changes, check whether the revision has changed
      * If the revision has changed, restart the background task
      * Otherwise apply the changes
      
      Closes #609. #705 remains open because the PagerAdapters for blogs need to be updated.
      
      See merge request !356
      df44015c
  4. Oct 20, 2016
  5. Oct 19, 2016
  6. Oct 14, 2016
  7. Oct 12, 2016
    • akwizgran's avatar
    • akwizgran's avatar
      Merge branch '704-constructor-injection' into 'master' · 8637faf8
      akwizgran authored
      Use constructor injection for controllers
      
      Also made some listeners volatile.
      
      This is part of #704 - if I don't find any other classes that need constructor injection I'll close the ticket.
      
      See merge request !351
      8637faf8
    • akwizgran's avatar
      Merge branch 'not-null-by-default' into 'master' · 970cbbf5
      akwizgran authored
      Null safety annotations
      
      The @NotNullByDefault annotation marks all fields, methods and parameters in a class or package @NotNull, so Android Studio will warn if values that may be null are used. Please use this annotation for new classes, and specify @Nullable for any fields, methods and parameters that may be null.
      
      Injected fields are initialised to null, so injected classes should use @MethodsNotNullByDefault and @ParametersNotNullByDefault, or specify @Nullable for injected fields.
      
      See merge request !349
      970cbbf5
Loading