Commit Graph

84 Commits

Author SHA1 Message Date
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
Brandon Presley bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
Brandon Presley 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
Brandon Presley 6e75614d10 Add basic working unit tests 2022-10-30 12:56:58 +13:00
Brandon Presley e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
Brandon Presley 36e6637ba2 Revert "Revert "Add custom app bar""
This reverts commit e84dd7bdea.
2022-10-23 12:35:58 +13:00
Brandon Presley e84dd7bdea Revert "Add custom app bar"
This reverts commit a664b65ce2.
2022-10-23 12:32:44 +13:00
Brandon Presley 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
Brandon Presley c73937396e Fix defaults for freshly installed app
Closes #95
2022-10-18 21:43:46 +13:00
Brandon Presley 8461f86e88 Wrap color context with useColor custom hook
I find it easier to import hooks by useX instead of
useContext(X). Like how the navigation library is just
useNavigation
2022-10-14 17:24:02 +13:00
Brandon Presley eb53d58991 Add ability to set app theme
Closes #79
2022-10-04 14:35:56 +13:00
Brandon Presley f242f54078 Use Material icons instead of ionic icons
Some of our other icons were already Material design,
so these Ionic icons looked out of place.
2022-09-27 12:45:13 +13:00
Brandon Presley 2fb0503882 Make sure hex colors are always upper case 2022-09-27 12:19:19 +13:00
Brandon Presley acfd0e698d Minor refactors and renaming 2022-09-25 17:49:26 +13:00
Brandon Presley 39fafa353f Split out some type definitions into their own files 2022-09-24 18:47:31 +12:00
Brandon Presley 7feb98f7ce Make fab text black when primary color is cyan 2022-09-24 15:59:52 +12:00
Brandon Presley e516cdfdc0 Add ability to customize primary color
Closes #40
2022-09-24 13:57:51 +12:00