Commit 287eff4
authored
feat: support imperial system (#125)
* feat: add weight entity and related stuff
- It should simplify the management of the unit system and values
* feat: add user preference in repository and expose it in `CompositionLocal`
* feat: expose user preference in settings screen
- reorganized settings
* refactor: enforce a display of a max number of decimal digits
* feat: resolve default unit system
* docs: expand UserPreferencesRepository documentation
* refactor: move constant in companion
* refactor: mark Weight.kt serializable (for room)
* feat: use Weight value class in Measurement entity
- refactored all code that uses it
* feat: use Weight value class in Set entity for load property
- refactored all code that uses it
- add some factory methods to Weight entity as helpers
- add some docs
* refactor: create custom functions to handle unit system suffix logic automatically and centrally
* perf: cache value across compositions
* docs: update changelog1 parent a091c75 commit 287eff4
40 files changed
Lines changed: 1209 additions & 281 deletions
File tree
- app
- schemas/org.librefit.db.AppDatabase
- src
- main
- java/org/librefit
- db
- converters
- entity
- repository
- enums
- userPreferences
- helpers
- models
- ui
- components
- dialogs
- modalBottomSheets
- models
- screens
- beforeSaving
- editWorkout
- infoExercise
- infoWorkout
- measurements
- profile
- settings
- statistics
- workout
- util
- res
- drawable
- values
- test/java/org/librefit/ui/screens
- measurements
- settings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
0 commit comments