Commit Graph

62 Commits

Author SHA1 Message Date
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
67eb1eca8b Simplify getBaseUrl method 2022-12-22 18:43:18 +01:00
Kirill Kamakin
feb9110f47 Remove Exception name from error messages 2022-12-21 22:41:36 +01:00
Kirill Kamakin
d74ce4bb2a Improve Base URL interceptor error reporting 2022-12-21 22:36:16 +01:00
Kirill Kamakin
913ac84310 Fix authentication with API token on v0.5.6 2022-12-16 21:27:17 +01:00
Kirill Kamakin
9ab86e7be3 Initialize recipe removal feature 2022-12-16 17:56:03 +01:00
Kirill Kamakin
2fa43f57b7 Update favorite status on icon click 2022-12-16 17:24:34 +01:00
Kirill Kamakin
aefb974cb3 Save isFavorite flag to DB for recipes 2022-12-16 17:24:33 +01:00
Kirill Kamakin
c66198f56e Add base URL interceptor test 2022-12-12 20:19:09 +01:00
Kirill Kamakin
57ce307cf5 Configure port through base url interceptor 2022-12-12 20:11:07 +01:00
Kirill Kamakin
f1ee255c9f Revert "Fix binding set of interceptors twice in release"
This reverts commit 31089eb499.
2022-12-11 20:32:02 +01:00
Kirill Kamakin
f6c0e862fc Set base url through Interceptor 2022-12-11 20:22:36 +01:00
Kirill Kamakin
31089eb499 Fix binding set of interceptors twice in release 2022-12-11 17:58:59 +01:00
Kirill Kamakin
dd313def96 Replace Authenticator with Interceptor 2022-12-11 17:03:09 +01:00
Kirill Kamakin
c99f9fea88 Create API token when signing in 2022-12-11 16:25:12 +01:00
Kirill Kamakin
a560db8bb6 Revert "Support invalidation in MealieAuthenticator"
This reverts commit 9c48f1b563.
2022-12-11 11:29:50 +01:00
Kirill Kamakin
9c48f1b563 Support invalidation in MealieAuthenticator 2022-12-11 10:17:13 +01:00
Kirill Kamakin
ac20105b9b Create OkHttp authenticator without token invalidation 2022-12-10 10:32:13 +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
915fd77daa Create impl package in datasource 2022-12-10 07:40:53 +01:00
Kirill Kamakin
a18984bda0 Implement displaying ingredient sections 2022-12-04 19:25:36 +01:00
Kirill Kamakin
a628912557 Parse ingredient amounts from V1 response 2022-12-04 18:47:27 +01:00
Kirill Kamakin
4826478a2a Implement saving recipes by URLs 2022-11-28 21:22:24 +01:00
Kirill Kamakin
980ffd54cb Link "testing" as test dependency 2022-11-12 14:06:57 +01:00
Kirill Kamakin
5b9cf78317 Fix TestExtensions package name 2022-11-12 13:57:27 +01:00
Kirill Kamakin
728ce66d06 Reuse testing module in datasource tests 2022-11-12 13:54:56 +01:00
Kirill Kamakin
76188c2caf Request notification permission for Chucker 2022-11-06 19:16:07 +01:00
Kirill Kamakin
7c02df4d30 Add unit tests 2022-10-31 20:30:13 +01:00
Kirill Kamakin
765e8877ec Move class to correct file 2022-10-30 13:44:33 +01:00
Kirill Kamakin
9d1fdce77a Generate random ids for instructions and ingredients 2022-10-30 13:21:27 +01:00
Kirill Kamakin
64d4d47be2 Cleanup responses a bit more 2022-10-30 13:08:25 +01:00
Kirill Kamakin
7d64215b63 Remove unused data 2022-10-30 13:01:06 +01:00
Kirill Kamakin
31ccf8822d Remove unused fields 2022-10-30 12:47:49 +01:00
Kirill Kamakin
9ed229f20f Fix parsing update recipe response 2022-10-30 11:53:48 +01:00
Kirill Kamakin
90380dcbf1 Fix logging method name 2022-10-30 11:08:27 +01:00
Kirill Kamakin
71d5900530 Split v1 creation to create/update 2022-10-30 11:07:02 +01:00
Kirill Kamakin
7ac0409cd5 Move v0 add recipe models to one file 2022-10-30 10:45:06 +01:00
Kirill Kamakin
2328c6ed59 Create separate model for v1 add recipe request 2022-10-30 10:43:56 +01:00
Kirill Kamakin
5f9779d904 Fix failing tests 2022-10-29 20:24:32 +02:00
Kirill Kamakin
a06d710f7a Use V1 model for authentication 2022-10-29 19:59:09 +02:00
Kirill Kamakin
9bf9146a40 Implement V1 authentication 2022-10-29 19:55:40 +02:00
Kirill Kamakin
3d267f319f Fix logging method name 2022-10-29 19:46:33 +02:00
Kirill Kamakin
5d99b0ee96 Extract duplicated makeCall methods 2022-10-29 19:46:09 +02:00
Kirill Kamakin
6280445a7c Move runCatchingExceptCancel to datasource 2022-10-29 19:31:02 +02:00
Kirill Kamakin
cda22215ec Extract server info repo 2022-10-29 19:15:57 +02:00
Kirill Kamakin
9e9d07db7d Fix invalid import 2022-10-29 18:36:15 +02:00
Kirill Kamakin
7702dbebd1 Move V0 responses to v0 package 2022-10-29 18:15:10 +02:00
Kirill Kamakin
3f2f945d99 Fix opening recipes on v1 2022-10-29 18:01:16 +02:00
Kirill Kamakin
47addc3b90 Fix opening recipes on v0.5.6 2022-10-29 17:46:28 +02:00