Commit Graph

93 Commits

Author SHA1 Message Date
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
ba24649a52 Organize imports 2023-11-15 11:21:49 +13:00
5a06b7ee2c Fix default colors on fresh install 2023-11-14 14:34:10 +13:00
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
be3af4db22 Refactor some code in App.tsx 2023-11-13 19:40:05 +13:00
4b5e7011d6 Fix logic for dark color theme 2023-11-13 19:16:13 +13:00
1ac78de724 Fix some database drift 2023-11-13 18:13:23 +13:00
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
155eaddbdd Add margins to app-wide progress bar 2023-11-13 16:07:12 +13:00
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
e65c053a62 Add setting to choose the startup page
Closes #186
2023-11-12 23:27:28 +13:00
ef63fcf470 Organize all imports 2023-11-12 17:05:37 +13:00
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
75263af8b3 Add global progress bar for ongoing timer - 1.175 🚀
Closes #182
2023-11-12 11:54:19 +13:00
1a289f1b7b Delete unused code from App.tsx 2023-11-09 12:55:52 +13:00
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
7928cab4c1 Swap to using MaterialCommunityIcons 2023-10-19 18:28:56 +13:00
c480d3e382 Replace usage of deprecated DeviceEventEmitter - 1.155 🚀 2023-09-04 14:32:40 +12:00
f778426aba Run prettier
Something happened with the deno formatter,
I can't remember what! Hahahahahaahahaha
2023-08-12 15:23:02 +12:00
b776d88327 Fix snackbar color for button 2023-07-17 16:21:56 +12:00
4b42ab5f21 Upgrade react-native-paper to v5 2023-07-15 13:21:09 +12:00
4303fe2cc4 Use deno fmt instead of prettier 2023-06-27 15:16:59 +12:00
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
c7952738b5 Add selected title for plans + sets
Inspired by the stock Files app in Android.
2023-01-03 17:21:51 +13:00
5d9df37778 Organize imports 2023-01-01 15:20:56 +13:00
f6eb7959e1 Add missing set statement for dark color 2022-12-08 15:40:26 +13:00
f85074a41f Remove logging from route toast 2022-12-06 12:30:36 +13:00
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
89edc661a4 Replace addColumn with query in add-color
Fixes #106
2022-11-15 17:36:01 +13:00
1e88a98353 Get color setting when changing system theme 2022-11-04 18:34:41 +13:00
fcce1ad9ef Add native events to communicate the running timer
Closes #99
2022-11-03 20:04:15 +13:00
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
187a0fbc68 Only initialize typeorm if uninitialized 2022-11-02 15:22:57 +13:00
156f1fc33f Fix button color on snackbars 2022-11-02 13:39:51 +13:00
0ed3b9817c Add lighter purple color option 2022-11-02 12:36:48 +13:00
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
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
8d7fe149f5 Remove unused code 2022-11-01 16:11:39 +13:00
139d75493e Memoize action in App.tsx 2022-11-01 16:08:02 +13:00
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
1a53fa324b Remove redundant Color context
Settings already stores the color set by the user.
2022-10-31 21:32:33 +13:00
bdb27894f7 Optimize root context 2022-10-31 21:00:10 +13:00
eafad1f47e Simplify migrations in App.tsx 2022-10-31 18:16:11 +13:00
bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
b7f1c2192e Pause converting to typeorm due to odd error
ERROR  TypeError: Cannot read property 'getItem' of undefined

This error is located at:
    in FlatList (created by SetList)
    in RCTView (created by View)
    in View (created by Page)
    in Page (created by SetList)
    in SetList (created by SceneView)
...

I found an open issue on the react-native github which seems
related https://github.com/facebook/react-native/issues/31523
but after following all of their suggestions I still have the
same error. I tried:
- Removing @babel/plugin-proposal-class-properties & @babel/plugin-transform-flow-strip-types
- Adding @babel/plugin-transform-flow-strip-types
2022-10-31 13:20:36 +13:00
6e75614d10 Add basic working unit tests 2022-10-30 12:56:58 +13:00
e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
36e6637ba2 Revert "Revert "Add custom app bar""
This reverts commit e84dd7bdea.
2022-10-23 12:35:58 +13:00
e84dd7bdea Revert "Add custom app bar"
This reverts commit a664b65ce2.
2022-10-23 12:32:44 +13:00
a664b65ce2 Add custom app bar
The header bar provided by react-navigation was jumping on first
load, whereas this custom one doesn't.
2022-10-23 12:24:39 +13:00