ramack / ActivityDiary

Android diary for any kind of activities
GNU General Public License v3.0
73 stars 37 forks source link

A terminated activity could be unexpectedly restarted #290

Open tingsu opened 4 years ago

tingsu commented 4 years ago

A terminated activity could be unexpectedly restarted when it is followed by a undo action on any other activity.

Start an activity Cinema and terminate it. On the history page, we can see Cinema was correctly recorded and its state is terminated (with specific start time and end time)

20200227_112750

Start an activity Cinema and terminate it. Then, we start Sleeping and undo it. According to my understanding, the app now should show <No Activity> on top. However, it shows Cinema, which was already terminated. On the history page, we can also see Cinema was unexpectedly restarted (only w/ start time but wo/ end time).

20200227_112827

ramack commented 4 years ago

This one I would consider a feature. I use the UNDO in case I accidentally selected a new activity, without wanting. So undoing the full action (including the termination of the previous one) seems logical. What do you think?

tingsu commented 4 years ago

Thanks for your explanation, Raphael.

From my end, as a user, an activity A is started, if I accidentally selected another new activity B, the undo action should cancel B and return back to A. This makes sense because I am still want to stay in activity A. The app currently does follow this common sense. Great!

But, if I started A and then terminated A (which means I finished A), and then I accidentally selected another new activity B when I actually planned to select activity C. I hope the undo action should cancel B but should not restart A. In other words, the app should show <No Activity>. Because I already terminated A, and I do not want to restart A. Undoing the full action (including the termination of the previous one, in this case A) will force me to terminate A again before I can start C (which is annoying). Also, restarting A affects the duration of A which I selected before.

Thus, I think this could be a bug or issue that should be resolved to improve user experience. Hope my explanation makes sense :) Thanks.

ramack commented 4 years ago

Yes, that totally makes sense. Thanks for detailing. Clearly if the termination time of the previous activity and the start time of the new one are nit exactly the same the old one shall.not be restarted!