spacecowboy / NotePad

Now under new management
GNU General Public License v3.0
382 stars 158 forks source link

The "ghost reminder widgets" glitch #412

Closed CampelloManuel closed 1 year ago

CampelloManuel commented 1 year ago

Describe the bug

too many reminders appear when going back & forth between the "note view" fragment & another app

how To Reproduce

  1. make a note and add 1 reminder
  2. open another app
  3. go back & forth between the "note view" and the other app, using the recents page
  4. See the error: many reminders appeared, all identical to the 1° one
  5. go back to the "note list" view and reopen the note
  6. there is only 1 reminder, because (I think) the new ones are just glitches and they're not saved on the database

Technical information

CampelloManuel commented 1 year ago

It also happens when click a link on a note. This opens the browser and when you go back, the undesired widget appears.

It may be just a glitch. even going back & forth between an opened note & another app will add reminders to the note.

The culprit is TaskDetailFragment.onLoadFinished(), see // TODO

CampelloManuel commented 1 year ago

I added a temporary fix: remove all reminder-widgets while quitting the fragment view. Since, while loading, we add them all back anyway, this is OK. See TODO in TaskDetailFragment if you want to provide a better fix