Brandon Presley
a0dc62e761
Remove all JS side Timers
...
This is the result of me fixing the background timers.
Previously our code just used a CountdownTimer
not even in a service, just immediately in the
@ReactMethod. This would in certain scenarios stop
running. Even with battery optimizations turned off.
The reason why all the JS side timers had to be removed
is because we were relying on RCTDeviceEventEmitter
which I don't know how to use from within a Service.
See my stackoverflow ticket here: https://stackoverflow.com/questions/74204339/sending-react-native-android-events-to-javascript-from-a-service
Closes #212 , #196
2024-02-17 17:27:42 +13:00
Brandon Presley
9b881c3d58
Change logging
...
1. Remove a few needless logs
2. Label where the logs are coming from
2024-02-07 17:31:13 +13:00
Brandon Presley
5ce3b9e69c
Move dark/light color selects next to buttons
...
Now we can easily preview what changing the
primary colors will cause.
2024-02-07 15:52:08 +13:00
Brandon Presley
426c557019
Add migrations to leading zeros for date settings
...
Also included the 12-hour formats for leading zeros.
2024-02-05 14:24:53 +13:00
Brandon Presley
b44cbae131
Fix progress bar not showing on some pages - 2.2 🚀
...
Moving the bar from App.tsx -> AppDrawer.tsx was a mistake,
because then the bar only shows on drawer routes instead of
app-wide.
2023-11-15 14:32:29 +13:00
Brandon Presley
bdc648d811
Factor out FatalError component from App.tsx
2023-11-15 12:14:34 +13:00
Brandon Presley
50b3a2ef3d
Fix text color in App.tsx fatal error message
2023-11-15 11:52:31 +13:00
Brandon Presley
7a24d844c5
Add fatal error message if database fails to initialize
...
This will help with debugging if the user can directly
provide what error occurred.
2023-11-15 11:46:33 +13:00
Brandon Presley
ba24649a52
Organize imports
2023-11-15 11:21:49 +13:00
Brandon Presley
5a06b7ee2c
Fix default colors on fresh install
2023-11-14 14:34:10 +13:00
Brandon Presley
d0f6550f29
Move TimerProgress from App.tsx -> AppDrawer.tsx
...
1. The lower this is in the stack the less re-renders we might cause
2. Now we can hook into useFocusEffect and prevent updates when out of
focus
2023-11-14 13:55:59 +13:00
Brandon Presley
be3af4db22
Refactor some code in App.tsx
2023-11-13 19:40:05 +13:00
Brandon Presley
4b5e7011d6
Fix logic for dark color theme
2023-11-13 19:16:13 +13:00
Brandon Presley
1ac78de724
Fix some database drift
2023-11-13 18:13:23 +13:00
Brandon Presley
6950cd04f4
Improve performance of app - 1.182 🚀
...
The App.tsx had a bunch of separate useState calls which would
cause unneccesary re-renders of the entire app. This became
apparent after adding the global progress bar, since it caused
even more re-renders to the point of being unusable.
2023-11-13 17:37:53 +13:00
Brandon Presley
155eaddbdd
Add margins to app-wide progress bar
2023-11-13 16:07:12 +13:00
Brandon Presley
bf6863000f
Stick progress bar to the bottom
...
Previously it jolted around all the other content
which looks gross so now it's absolute positioned bottom.
2023-11-12 23:35:43 +13:00
Brandon Presley
e65c053a62
Add setting to choose the startup page
...
Closes #186
2023-11-12 23:27:28 +13:00
Brandon Presley
ef63fcf470
Organize all imports
2023-11-12 17:05:37 +13:00
Brandon Presley
901cc72fbd
Revert my work on surgically updating lists - 1.177 🚀
...
I tried to maintain the current scroll position
within a list however this caused many issues
to do with outdated data, as well as performance issues.
Now we are going back to just refreshing any list on focus.
Closes #184
2023-11-12 17:03:22 +13:00
Brandon Presley
75263af8b3
Add global progress bar for ongoing timer - 1.175 🚀
...
Closes #182
2023-11-12 11:54:19 +13:00
Brandon Presley
1a289f1b7b
Delete unused code from App.tsx
2023-11-09 12:55:52 +13:00
Brandon Presley
e8ee4a253e
Migrate from Drawer -> Stacks to Stack -> Drawer
...
This simplifies our codebase greatly by
only having a single stack navigator and
a single drawer navigator. Previously we had
a stack navigator for every main page on the drawer.
2023-10-28 15:59:25 +13:00
Brandon Presley
7928cab4c1
Swap to using MaterialCommunityIcons
2023-10-19 18:28:56 +13:00
Brandon Presley
c480d3e382
Replace usage of deprecated DeviceEventEmitter - 1.155 🚀
2023-09-04 14:32:40 +12:00
Brandon Presley
f778426aba
Run prettier
...
Something happened with the deno formatter,
I can't remember what! Hahahahahaahahaha
2023-08-12 15:23:02 +12:00
Brandon Presley
b776d88327
Fix snackbar color for button
2023-07-17 16:21:56 +12:00
Brandon Presley
4b42ab5f21
Upgrade react-native-paper to v5
2023-07-15 13:21:09 +12:00
Brandon Presley
4303fe2cc4
Use deno fmt instead of prettier
2023-06-27 15:16:59 +12:00
Brandon Presley
7b401388b5
Get last now excludes todays sets - 1.129
...
Otherwise the minute you enter something it
becomes the last set. Much more useful to be
showing yesterdays working set instead.
2023-03-06 18:32:32 +13:00
Brandon Presley
c7952738b5
Add selected title for plans + sets
...
Inspired by the stock Files app in Android.
2023-01-03 17:21:51 +13:00
Brandon Presley
5d9df37778
Organize imports
2023-01-01 15:20:56 +13:00
Brandon Presley
f6eb7959e1
Add missing set statement for dark color
2022-12-08 15:40:26 +13:00
Brandon Presley
f85074a41f
Remove logging from route toast
2022-12-06 12:30:36 +13:00
Brandon Presley
dc27ae9868
Split up dark and light color settings
...
Previously it was possible to choose a color combination
that was almost impossible to read (due to contrast).
Now we have prevented this from happening, as well as
giving the user more customizability.
2022-11-26 13:15:12 +13:00
Brandon Presley
89edc661a4
Replace addColumn with query in add-color
...
Fixes #106
2022-11-15 17:36:01 +13:00
Brandon Presley
1e88a98353
Get color setting when changing system theme
2022-11-04 18:34:41 +13:00
Brandon Presley
fcce1ad9ef
Add native events to communicate the running timer
...
Closes #99
2022-11-03 20:04:15 +13:00
Brandon Presley
8835a3efd3
Prevent double initializing typeorm
...
App is re-mounted when the system theme is changed,
but the connection to the sqlite database stays active.
This means the previous code would fail to initialize
and then be a blank screen.
Closes #107
2022-11-02 15:37:32 +13:00
Brandon Presley
187a0fbc68
Only initialize typeorm if uninitialized
2022-11-02 15:22:57 +13:00
Brandon Presley
156f1fc33f
Fix button color on snackbars
2022-11-02 13:39:51 +13:00
Brandon Presley
0ed3b9817c
Add lighter purple color option
2022-11-02 12:36:48 +13:00
Brandon Presley
0a2e0086b3
Add import React to App.tsx
...
Paper seemed to complain about it for some reason.
I thought one of the parts of using Hermes meant
I didn't need to import React?
2022-11-01 19:59:48 +13:00
Brandon Presley
31f1528c35
Replace settings context with theme context
...
The settings context was having a big performance
impact on the app. We only truly need the theme + color
to be a global context.
2022-11-01 16:50:03 +13:00
Brandon Presley
8d7fe149f5
Remove unused code
2022-11-01 16:11:39 +13:00
Brandon Presley
139d75493e
Memoize action in App.tsx
2022-11-01 16:08:02 +13:00
Brandon Presley
49b5eb48c6
Refactor MassiveSnack
...
Instead of using a context for the whole app
use DeviceEventEmitter with root state.
This will probably improve performance,
since I think the react context was
re-rendering the entire DOM tree.
2022-11-01 15:55:37 +13:00
Brandon Presley
1a53fa324b
Remove redundant Color context
...
Settings already stores the color set by the user.
2022-10-31 21:32:33 +13:00
Brandon Presley
bdb27894f7
Optimize root context
2022-10-31 21:00:10 +13:00
Brandon Presley
eafad1f47e
Simplify migrations in App.tsx
2022-10-31 18:16:11 +13:00