adrcotfas / Goodtime

:hourglass_flowing_sand: productivity app for Android
Apache License 2.0
941 stars 111 forks source link

fix sometimes sessions not being saved #307

Closed RevealedSoulEven closed 1 year ago

RevealedSoulEven commented 1 year ago

Fixed #289

adrcotfas commented 1 year ago

Hey, how did you reproduce this before the fix?

RevealedSoulEven commented 1 year ago

In my phone it was at a condition where only one out of every five sessions were being saved so I didn't knew how to fix that so I have added option where whenever a session and it will create a text file and add the timestamp in it so I used to manually add everything. So I didn't need to reproduce that because it was already happening with me but if you try in any emulator like BlueStack and all so if you try with 10 to 20 session after sometime it won't save means after 10 to 20 sessions it won't start saving those things so this is how I have used frida to analyse what was happening and that function was giving an error and using reverse engineering I got that this was the error and I fix that now it is working I have tested is very well so I have greater this work please merge and thank you.

RevealedSoulEven commented 1 year ago

Well, thanks for it. Will add more features too soon

adrcotfas commented 1 year ago

@RevealedSoulEven Thank you for your contribution! This will come in version 2.5.6.

Although I was not able to reproduce this issue and don't see the relation between it and the change, the line you removed was redundant at best or affecting the performance in the worst case: https://medium.com/androiddevelopers/room-coroutines-422b786dc4c5.

Room calls the CoroutinesRoom.execute suspend function, which switches to a background dispatcher

RevealedSoulEven commented 1 year ago

Yes, that's what I analyzed in Frida.

On Sun, 26 Feb, 2023, 3:41 pm Adrian Cotfas, @.***> wrote:

@RevealedSoulEven https://github.com/RevealedSoulEven Thank you for your contribution! This will come in version 2.5.6.

Although I was not able to reproduce this issue and don't see the relation between it and the change, the line you removed was redundant at best or affecting the performance in the worst case: https://medium.com/androiddevelopers/room-coroutines-422b786dc4c5.

Room calls the CoroutinesRoom.execute suspend function, which switches to a background dispatcher

— Reply to this email directly, view it on GitHub https://github.com/adrcotfas/Goodtime/pull/307#issuecomment-1445316343, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYHMXW3WBUKRL7QZQB5SPDWZMT4BANCNFSM6AAAAAAVHEWITI . You are receiving this because you were mentioned.Message ID: @.***>