Skip to content
Snippets Groups Projects

fix persistance

Merged Ernir Erlingsson requested to merge 433-forum-persistance into master

Closes #433 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
109 110
110 111 AndroidExecutor androidExecutor();
111 112
113 ForumPersistentData forumPersistentData();
  • Author Contributor

    The AndroidComponent MUST declare all variables that are to be exported with the Application lifecycle, this I had forgotten and therefore the persistantData had the Activity lifecycle, i.e. it didn't persist as it should

  • 140 140
    141 141 @Provides
    142 142 @Singleton
    143 ForumPersistentData provideForumPersistence(ForumPersistentData fpd) {
    144 return fpd;
    143 ForumPersistentData provideForumPersistence() {
    144 return new ForumPersistentData();
    • Author Contributor

      This change was necessary because of Dagger complaining of a circular dependency, you can't do a constructor injection and also return the same object, to do that you need to use a interface + an impl class. The new was easier to implement since the ForumPersistentData doesn't use any Injections anyways

  • LGTM! Thanks!

  • Torsten Grote mentioned in commit bbed6731

    mentioned in commit bbed6731

  • Torsten Grote Status changed to merged

    Status changed to merged

  • Torsten Grote mentioned in merge request !222 (merged)

    mentioned in merge request !222 (merged)

  • akwizgran Milestone changed to %Milestone D

    Milestone changed to %Milestone D

  • Please register or sign in to reply
    Loading