I believe this was from ages ago when I was using `setInterval` to try
and keep state of the timers from JavaScript. Now we are relying on our
timers in Kotlin so we don't need this any more.
Typically when you select all records it's because you want
to operate on those records immediately. The only case
this wouldn't be true is if you were scrolling, then selecting all
a bunch of times. I think it's more likely someone just wants to
select all, then delete.
I was awaiting the result of the sqlite operations
when really I should have just set the state immediately,
and done the operations in the background.
Closes#141
After adding TypeORM I had to remove the strict checking in TypeScript.
This leads to null errors such as this. Kind of annoying, but I think
the large reduction in code from adding TypeORM is worth it. We
shall see...
Since all this state was being set at the same time,
on load, it makes more sense to have it as a single state.
Also they are all connected to the same table so it makes more
sense this way.
Also, I removed the use focus effect in favor of just a
use effect which runs on mount. The things being refreshed here
weren't very important to be updated frequently, and focus effect
has a cost on performance.
If battery optimizations are on for the app,
alarms will have several unpredictable bugs.
For example, sometimes sounds won't play,
sometimes re focuisng the app won't work.