eecs394-s18 / ClassConfusion-Refactor

Large refactor of Purple team's ClassConfusion - large enough to need a new repo.
0 stars 0 forks source link

Items retrieved from Firebase are duplicated on the screen #6

Open bdscharf opened 6 years ago

bdscharf commented 6 years ago

Items retrieved from Firebase are duplicated on the screen. This happens when something is changed on the database (like if a different user modifies or adds a new key).

One possible (ugly) solution: new Pipe for the Angular loop that automatically removes duplicates. Hopefully this isn't the best option though.

bdscharf commented 6 years ago

potential solution

juliawilkins commented 6 years ago

TODO: add reload button as temporary fix

Example: `<button ion-button icon-only (click)="getTopics()">

  </button>`

Put this inside the navbar (should appear next to home button in navbar) on every page that includes adding/deleting topics on both professor and student side

NOTE: the "getTopics" function line will have to change based on what file you're in (e.g. getClasses, getLectures, getTopics)

bdscharf commented 6 years ago

see lines 1-15 here for temporary fix using reload button

vcabales commented 6 years ago

Added temporary fix with refresh buttons

bdscharf commented 6 years ago

https://stackoverflow.com/questions/47637317/how-to-prevent-duplicate-results-with-angularfire (duplicate fix via RxJS) https://stackoverflow.com/questions/49214483/resolve-promise-angular-5-and-firebase (return a promise) https://stackoverflow.com/questions/41885219/angular-2-firebase-observable-to-promise-doesnt-return-anything (promise iteration)

trying some of these options