Commit Graph

118 Commits

Author SHA1 Message Date
Kirill Kamakin
c8f1f477cc Fix transition when base URL is actually incorrect (#196) 2024-01-13 11:18:12 +00:00
Kirill Kamakin
de4df95a0e Complete migration to Compose (#194)
* Migrate disclaimer screen to Compose

* Migrate base URL screen to Compose

* Migrate base URL screen to Compose

* Migrate authentication screen to Compose

* Initialize add recipe screen

* Remove unused resources

* Display add recipe operation result

* Add delete icon to ingredients and instructions

* Allow navigating between fields on add recipe

* Allow navigating between fields on authentication screen

* Allow to proceed from keyboard on base url screen

* Use material icons for recipe item

* Expose base URL as flow

* Initialize Compose navigation

* Allow sending logs again

* Allow to override navigation and top bar per screen

* Add additional logs

* Migrate share recipe screen to Compose

* Fix unit tests

* Restore recipe list tests

* Ensure authentication is shown after URL input

* Add autofill to authentication

* Complete first set up test

* Use image vector from Icons instead of drawable

* Add transition animations

* Fix logging host in Host header

* Do not fail test if login token is used
2024-01-13 10:28:10 +00:00
Kirill Kamakin
94f12820bc Ensure authentication token is always sent when it exists (#193)
* Ensure auth token is sent if it is present

* Allow using login token for other requests while API token is created

* Update version code
2023-12-28 10:05:20 +00:00
Kirill Kamakin
36a72b63de Implement sending logs to developer (#190)
* Save logs to a file

* Send logs via email

* Enable network logs in release builds

* Remove useless chooser title

* Append to logs file and ignore I/O errors

* Ensure email and password are not logged

* Ensure base URL is never logged

* Add logs disclaimer
2023-12-10 11:49:03 +00:00
Kirill Kamakin
f6f44c7592 Use Compose to draw the list of recipes (#187)
* Add paging-compose dependency

* Move progress indicator to separate module

* Introduce color scheme preview

* Move loading helper to UI module

* Move helper composables to UI module

* Rearrange shopping lists module

* Add LazyPagingColumnPullRefresh Composable

* Add BaseComposeFragment

* Add pagingDataRecipeState

* Add showFavoriteIcon to recipe state

* Disable unused placeholders

* Make "Try again" button optional

* Fix example email

* Wrap recipe info into a Scaffold

* Add dialog to confirm deletion

* Add RecipeItem Composable

* Add RecipeListError Composable

* Add RecipeList Composable

* Replace recipes list Views with Compose

* Update UI test

* Remove application from ViewModel
2023-11-23 06:23:30 +00:00
Kirill Kamakin
5408329604 Display ingredient notes (#182)
* Display ingredient note

* Add changelog

* Update README.md
2023-11-13 19:09:34 +00:00
Kirill Kamakin
941d45328e Add linked ingredients to recipe step (#177)
* Add Compose to app module

* Move Theme to ui module

* Add Coil image loader

* Use Compose for recipe screen

* Save instruction to ingredient relation to DB

* Display ingredients as server formats them

* Display linked ingredients under each step

* Fix ingredients padding

* Show recipe full screen

* Fix recipe screen UI issues

* Hide keyboard on recipe navigation

* Fix loading recipes from DB with no instructions or ingredients

* Add instructions section title

* Add ingredients section title

* Remove unused view holders
2023-11-07 20:47:01 +01:00
Kirill Kamakin
5ed1acb678 Simplify network layer (#175)
* Use Ktor for network requests

* Remove V0 version

* Remove Retrofit dependency

* Fix url

* Update versions of dependencies

* Revert kotlinx-datetime

Due to https://github.com/Kotlin/kotlinx-datetime/issues/304

* Rename leftovers

* Remove OkHttp

* Remove unused manifest

* Remove unused Hilt module

* Fix building empty image URLs

* Use OkHttp as engine for Ktor

* Reduce visibility of internal classes

* Fix first set up test

* Store only auth token, not header

* Remove UnitInfo/FoodInfo/VersionInfo/NewShoppingListItemInfo

* Remove RecipeSummaryInfo and ShoppingListsInfo

* Remove FullShoppingListInfo

* Remove ParseRecipeURLInfo

* Remove FullRecipeInfo

* Sign out if access token does not work

* Rename getVersionInfo method

* Update version name
2023-11-05 15:01:19 +01:00
Kirill Kamakin
79dee6a9ad Allow users to trust self-signed certificates (#160)
* Implement CERT-Store

* Trust user-added certificates

* Improve code readability

* Implement saving self-signed certs to storage

* Create interface for TrustedCertificatesStore

* Remove unused code

* Make datasource implementation internal

* Bump app version to 29 (0.4.0)

---------

Co-authored-by: fz72 <fz72@gmx.de>
2023-07-04 22:53:05 +02:00
Kirill Kamakin
1e5e727e92 Implement shopping lists screen (#129)
* Initialize shopping lists feature

* Start shopping lists screen with Compose

* Add icon to shopping list name

* Add shopping lists to menu

* Set max size for the list

* Replace compose-adapter with accompanist

* Remove unused fields from shopping lists response

* Show list of shopping lists from BE

* Hide shopping lists if Mealie is 0.5.6

* Add shopping list item click listener

* Create material app theme for Compose

* Use shorter names

* Load shopping lists by pages and save to db

* Make page handling logic match recipes

* Add swipe to refresh to shopping lists

* Extract SwipeToRefresh Composable

* Make LazyPagingColumn generic

* Show refresh only when mediator is refreshing

* Do not refresh automatically

* Allow controlling Activity state from modules

* Implement navigating to shopping list screen

* Move Compose libraries setup to a plugin

* Implement loading full shopping list info

* Move Storage classes to database module

* Save shopping list items to DB

* Use separate names for separate ids

* Do only one DB version update

* Use unique names for all columns

* Display shopping list items

* Move OperationUiState to ui module

* Subscribe to shopping lists updates

* Indicate progress with progress bar

* Use strings from resources

* Format shopping list item quantities

* Hide unit/food/note/quantity if they are not set

* Implement updating shopping list item checked state

* Remove unnecessary null checks

* Disable checkbox when it is being updated

* Split shopping list screen into composables

* Show items immediately if they are saved

* Fix showing "list is empty" before the items

* Show Snackbar when error happens

* Reduce shopping list items paddings

* Remove shopping lists when URL is changed

* Add error/empty state handling to shopping lists

* Fix empty error state

* Fix tests compilation

* Add margin between text and button

* Add divider between checked and unchecked items

* Move divider to the item

* Refresh the shopping lists on authentication

* Use retry when necessary

* Remove excessive logging

* Fix pages bounds check

* Move FlowExtensionsTest

* Update Compose version

* Fix showing loading indicator for shopping lists

* Add Russian translation

* Fix SDK version lint check

* Rename parameter to match interface

* Add DB migration TODO

* Get rid of DB migrations

* Do not use pagination with shopping lists

* Cleanup after the pagination removal

* Load shopping list items

* Remove shopping lists storage

* Rethrow CancellationException in LoadingHelper

* Add pull-to-refresh on shopping list screen

* Extract LazyColumnWithLoadingState

* Split refresh errors and loading state

* Reuse LazyColumnWithLoadingState for shopping list items

* Remove paging-compose dependency

* Refresh shopping list items on authentication

* Disable missing translation lint check

* Update Compose and Kotlin versions

* Fix order of checked items

* Hide useless information from a shopping list item
2023-07-03 15:07:19 +02:00
Kirill Kamakin
05f1c974a6 Update unit tests accordingly 2023-04-07 13:58:09 +02:00
Kirill Kamakin
f322112405 Fallback to HTTP if 443 is closed too 2022-12-22 18:48:46 +01:00
Kirill Kamakin
05058091e9 Add BaseURLViewModel tests 2022-12-22 18:39:31 +01:00
Kirill Kamakin
caaebfd127 Remove redundant / in test data 2022-12-16 21:43:35 +01:00
Kirill Kamakin
c1a292851a Add ViewModel tests 2022-12-16 21:19:19 +01:00
Kirill Kamakin
9a3a30aca2 Add repo tests 2022-12-16 20:49:33 +01:00
Kirill Kamakin
226097d096 Remove recipe from local db when deleted 2022-12-16 20:24:40 +01:00
Kirill Kamakin
7da36931ac Fix failing tests 2022-12-16 17:48:15 +01:00
Kirill Kamakin
16421d6a2a Add tests for some affected components 2022-12-16 17:41:01 +01:00
Kirill Kamakin
127153cac7 Update unit tests 2022-12-16 17:24:34 +01:00
Kirill Kamakin
f6c0e862fc Set base url through Interceptor 2022-12-11 20:22:36 +01:00
Kirill Kamakin
fd89dbad3b Add From24AuthMigrationExecutorTest tests 2022-12-11 18:33:45 +01:00
Kirill Kamakin
7a5cbbb5a3 Add MigrationDetectorImpl tests 2022-12-11 18:19:32 +01:00
Kirill Kamakin
c99f9fea88 Create API token when signing in 2022-12-11 16:25:12 +01:00
Kirill Kamakin
9adf37ae33 Move token invalidation to auth interceptor 2022-12-10 09:30:38 +01:00
Kirill Kamakin
54d0c895a9 Extract Authorization header to an interceptor 2022-12-10 08:15:46 +01:00
Kirill Kamakin
a18984bda0 Implement displaying ingredient sections 2022-12-04 19:25:36 +01:00
Kirill Kamakin
d1aea9fc83 Fix RecipeInfoViewModel test 2022-12-04 19:04:59 +01:00
Kirill Kamakin
a628912557 Parse ingredient amounts from V1 response 2022-12-04 18:47:27 +01:00
Kirill Kamakin
e1b29f3806 Add ShareRecipeViewModel tests 2022-11-29 20:42:56 +01:00
Kirill Kamakin
0c41aac9b7 Use regex to find URLs 2022-11-28 21:59:08 +01:00
Kirill Kamakin
a0a3862df7 Add ShareRecipeRepoImpl tests 2022-11-28 21:45:03 +01:00
Kirill Kamakin
d62ce1a74e Remove Google Analytics and Crashlytics 2022-11-22 19:50:29 +01:00
Kirill Kamakin
4692c138d5 Fix failing test 2022-11-17 22:24:31 +01:00
Kirill Kamakin
32d366b8fd Fix absent recipe refresh on authorization 2022-11-13 15:38:45 +01:00
Kirill Kamakin
5c66247843 Rename RecipesFragment to RecipesListFragment 2022-11-13 15:04:24 +01:00
Kirill Kamakin
abd356b461 Add main view model tests 2022-11-13 13:25:12 +01:00
Kirill Kamakin
be534e73c3 Add paging factory tests 2022-11-13 13:18:08 +01:00
Kirill Kamakin
b7e8054d38 Fix unit tests 2022-11-13 11:05:36 +01:00
Kirill Kamakin
4dcf1cc915 Extract base test classes to separate module 2022-11-12 13:52:56 +01:00
Kirill Kamakin
cb23f1a62d Extract repetitive test setup to base class 2022-11-12 13:41:23 +01:00
Kirill Kamakin
612101f1b4 Fix base URL view model coverage calculation 2022-11-12 13:21:46 +01:00
Kirill Kamakin
3504eae248 Add base URL tests 2022-11-12 12:48:46 +01:00
Kirill Kamakin
0c0248dbbc Ignore ingredients with empty note 2022-11-06 20:02:51 +01:00
Kirill Kamakin
3b88eb65e8 Add RecipeViewModel tests 2022-11-06 19:37:43 +01:00
Kirill Kamakin
0c87657b55 Add RecipeInfoViewModel test 2022-11-06 19:37:42 +01:00
Kirill Kamakin
b3ea95f732 Update recipe repo 2022-11-06 19:37:42 +01:00
Kirill Kamakin
79324278de Add Analytics tests 2022-11-05 12:42:58 +01:00
Kirill Kamakin
dfd590ee50 Add RecipeViewModel tests 2022-11-05 12:17:48 +01:00
Kirill Kamakin
2027f6ac60 Add valueUpdatesOnly tests 2022-11-05 11:44:14 +01:00