29 Commits

Author SHA1 Message Date
Sad Ellie
78f9d59fd8 Big viewmodel refactor
(squashed)
2023-01-04 12:20:06 +04:00
Sad Ellie
b1c8780fc1 Added Number base converter #14 2023-01-02 18:17:26 +04:00
Sad Ellie
aa1f5f8e9b Added cent (area) #8 2022-12-30 21:42:02 +04:00
Sad Ellie
84b428e620 Merge branch 'refactor/ui' 2022-12-30 20:53:14 +04:00
Sad Ellie
24c407a05d Not so little UI refactor.
Refactored Utilities.

Refactored MainScreen. Now using a better approach for portrait/landscape.

Refactored TextField.
2022-12-30 20:52:42 +04:00
Sad Ellie
d41f9a7d13 Added magnetic flux conversion 2022-12-30 20:50:06 +04:00
Sad Ellie
16b8bd35a3 Fix (?) for input conversion (#12)
- Now doing conversion in coroutine.
- Little refactor for MainViewModel
- Text fields are limited to 1000 symbols now

- Little bug added. Conversion result can get really slow when converting extremely large numbers 99^999999 (like really big). Very rare case and user would probably never enter such values. Can't find a proper fix yet.
2022-12-24 13:45:00 +04:00
Sad Ellie
5585eacafe Fixed helper function for viewModel tests 2022-12-11 16:11:00 +04:00
Sad Ellie
b46d799382 Add brackets to formatter 2022-12-11 16:08:41 +04:00
Sad Ellie
1f35763893 More readable code for input processing tests 2022-12-11 00:12:09 +04:00
Sad Ellie
86596f23c0 Add multiply symbol where needed 2022-12-10 18:06:57 +04:00
Sad Ellie
669e2a0c19 More rules for input processing 2022-12-09 21:28:31 +04:00
Sad Ellie
51961d5f68 Buttons are now always enabled (visually).
Disabled buttons states are useless and make it difficult to modify app theme.
2022-12-08 16:11:39 +04:00
Sad Ellie
ffd4284f55 Improved support for exponent and square root in input processing 2022-12-08 14:11:42 +04:00
Sad Ellie
7d2917d942 Introduced helpers for tests 2022-12-08 13:10:09 +04:00
Sad Ellie
d544a959f0 Fixed formatter 2022-12-08 12:35:22 +04:00
Sad Ellie
aff3cd4ca3 Back to ExprK.
Added more operators for calculator. Formatting and other stuff are broken.

P.S. Using my own fork of ExprK. Added square root operator to it.
2022-12-07 20:52:17 +04:00
Sad Ellie
e620794358 Fixed engineering string formatter 2022-11-21 11:11:16 +04:00
Sad Ellie
cc1c94e86e Custom formatter.
NumberFormatter from java is bad.

Updated tests, LGTM.
2022-11-20 11:03:52 +04:00
Sad Ellie
f8dbd7a867 Fixed Levenshtein distance search
Was missing lowercase transformations
2022-09-03 13:27:30 +03:00
Sad Ellie
f6c1d44be2 Units repository updates
Units filter fixes
Performance drop fixed
2022-08-22 22:24:52 +03:00
Sad Ellie
0aa71acf1a Fixed tests 2022-08-18 22:00:54 +03:00
Sad Ellie
ab4fbaee52 Tiny code clean up 2022-06-19 16:20:43 +03:00
Sad Ellie
e3f70653c0 Added boilerplate notice 2022-06-19 16:12:37 +03:00
Sad Ellie
a6f1ddee7d Refactored Units list screens
Added second ViewModel
AllUnitsRepository instead of a simple list
Added some tests
Left and right side screen are now separate
2022-06-17 23:47:46 +03:00
Sad Ellie
63d943cbb9 No more wildcard imports 2022-06-03 20:19:10 +03:00
Sad Ellie
a73624b726 New units and tests
All units (except for currencies) are now tested
Changed some basic units and fixed errors
Added new unit groups
2022-05-27 21:57:51 +03:00
Sad Ellie
84a4611c3d Levenshtein distance improvements 2022-05-11 23:16:28 +03:00
Sad Ellie
35504f7927 Testable application
Added dependencies for testing
Added tests for stuff in Utils.kt and MainViewModel.kt just to make sure that the setup is working (can move to TDD now)
Added repository for database so that code is more testable
2022-05-09 14:45:29 +03:00