Commit Graph

177 Commits

Author SHA1 Message Date
Kirill Kamakin 8fee0c3a3d Reorganize code 2022-04-03 17:21:18 +05:00
Kirill Kamakin 915ffa521b Use @Singleton where possible 2022-04-03 00:34:29 +05:00
Kirill Kamakin 1b97504c7a Update minSdk to 23 2022-04-03 00:33:20 +05:00
Kirill Kamakin 7fc2887dc7 Major code refactoring
Main goals are:
1. Ability to use mocks in unit tests instead of
having to setup mock web server as if it was an
integration test.
2. Cache Retrofit services in memory
3. Make it easier to read
4. Use OptIn where possible instead of propagating
Experimental* annotations everywhere
2022-04-03 00:17:28 +05:00
Kirill Kamakin b56f267979 Use viewLifecycleOwner to observe auth status
Even though views aren't modified when auth
status changes, we still need to operate
only when view is visible.
2022-04-02 18:12:32 +05:00
Kirill Kamakin 706f981cca Suppress Room warning 2022-04-02 18:08:14 +05:00
Kirill Kamakin b3093b4bb3 Update versions of dependencies 2022-04-02 18:08:14 +05:00
Kirill Kamakin 8399b0014a Bump version to v0.1.4 (#26) 2021-12-27 16:58:14 +00:00
Kirill Kamakin c8019e9c85 Implement hiding ingredients and instructions 2021-12-27 19:41:56 +03:00
Kirill Kamakin 6232af2295 Improve recipe info screen UI 2021-12-27 14:47:53 +03:00
Kirill Kamakin 50f6066416 Fix memory leaks found by LeakCanary 2021-12-27 14:26:35 +03:00
Kirill Kamakin 25f14226df Replace Stetho with Flipper, add LeakCanary 2021-12-27 14:26:35 +03:00
Kirill Kamakin 81fb1ae984 Revert "Add Stetho to debug application (#18)"
This reverts commit cc2fb772
Stetho seems to be unmaintained anymore
It also doesn't work with latest Chrome
2021-12-27 12:31:34 +03:00
Kirill Kamakin 90dbb180a0 Use runTest instead of runBlockingTest now 2021-12-27 12:14:28 +03:00
Kirill Kamakin 6bf78a6177 Disable R8 warnings regarding OkHttp's dependencies 2021-12-27 11:50:03 +03:00
Kirill Kamakin 227fc9b0ff Bump versions of dependencies 2021-12-27 11:50:03 +03:00
Kirill Kamakin d4bb53f892 Specify OkHttp version via the bill of materials (BOM) 2021-12-27 11:50:02 +03:00
Kirill Kamakin a36fec226d Use view binding property delegate (#22) 2021-12-27 08:37:10 +00:00
Kirill Kamakin dfaa12907c Move AuthService to impl package 2021-12-27 11:05:46 +03:00
Kirill Kamakin edfac85e8e Extract dagger modules to di package 2021-12-27 11:03:38 +03:00
Davide Baret 9396fab237 Fix background color for dark theme 2021-12-24 20:05:33 +01:00
Kirill Kamakin b5249e4bf6 Replace Glide with Picasso (#19) 2021-11-28 13:41:21 +00:00
Kirill Kamakin cc2fb77269 Add Stetho to debug application (#18) 2021-11-28 13:32:05 +00:00
Kirill Kamakin a1b81eca64 Bump version to v0.1.3 (#17) 2021-11-27 16:50:32 +00:00
Kirill Kamakin 186e1bf944 Show password disguise toggle icon (#16)
Fixes #6
2021-11-27 16:44:56 +00:00
Kirill Kamakin f74973e40a Fix expanding bottom sheet when not enough content (#15)
This commit makes sure bottom sheet dialog has the size
of its contents. That way it doesn't expand further than it
should. Fixes #4
2021-11-27 16:40:41 +00:00
Kirill Kamakin a15fac7c7e Hide error when text is entered (#14) 2021-11-27 16:36:30 +00:00
Kirill Kamakin 44458dd146 Fix a number of lint issues (#2)
* Fix systemUiVisibility deprecation warnings

This commit extracts setSystemUiVisibility as
an extension and uses the new API depending on
the Build.VERSION

* Fix splash fragment vector issues

Clip-path isn't available before V24 and
width/height should not exceed 200 dp.

* Remove unused disclaimer fragment header

* Remove unused ic_launcher_round

* Ignore IconMissingDensityFolder lint

Ignoring it because all the images are vector

* Ignore UnusedAttribute lint

It warns about networkSecurityConfig which
is used only in debug builds to allow
user SSL certificates. Lint says it's not
available before v24. But it doesn't matter
since before v24 the user SSL certificates
were allowed by default.

* Use plurals for disclaimer count down
2021-11-27 13:10:00 +00:00
Kirill Kamakin 1e5d65b816 Update version to 0.1.2 2021-11-27 12:35:12 +03:00
Kirill Kamakin 0586776a3e Fix image loader duplicating slashes 2021-11-27 12:34:37 +03:00
Kirill Kamakin 339f8327de Implement URL input format checks 2021-11-27 12:27:25 +03:00
Kirill Kamakin ebba1889c7 Update version to 0.1.1 2021-11-27 10:48:05 +03:00
Kirill Kamakin 9ea2facc8d Extract recipe info adapters to ViewModel 2021-11-27 10:44:28 +03:00
Kirill Kamakin 715e63a1d4 Specify RecipeInfoFragment's layout managers in xml 2021-11-27 10:39:57 +03:00
Kirill Kamakin cc5c9edb1f Refactor RecipesFragment
This commit extracts SwipeRefreshLayout extension to a
separate file. Additionally, it refactors RecipesFragment in
order to move all the logic to the ViewModel from the View.
2021-11-27 00:22:52 +03:00
Kirill Kamakin 897698ab02 Extract remote classes to local ones mapping 2021-11-27 00:21:15 +03:00
Kirill Kamakin b3d03c5281 Extract SharedPreferences extensions to a file 2021-11-27 00:19:49 +03:00
Kirill Kamakin dc6084ee25 Move auth response handling to runCatching
runCatching is easier to read and understand than mapCatching
2021-11-27 00:18:56 +03:00
Kirill Kamakin b5606f3241 Move network extensions to separate file 2021-11-27 00:18:12 +03:00
Kirill Kamakin 20c19fd644 Move RoomTypeConverters to util 2021-11-27 00:17:18 +03:00
Kirill Kamakin 91078de1a7 Replace PagingSource factory with Google's impl 2021-11-26 19:39:44 +03:00
Kirill Kamakin 20c3fa8e20 Specify version name 2021-11-25 20:43:09 +03:00
Kirill Kamakin 7ecad55a60 Update recipe view holder ellipsize params 2021-11-25 20:18:21 +03:00
Kirill Kamakin 0d3dfeebd9 Use rounded corners for recipe view holder 2021-11-25 20:15:01 +03:00
Kirill Kamakin e701b5d7df Show recipe info in bottom sheet dialog 2021-11-25 20:06:53 +03:00
Kirill Kamakin 6c41c4fcf6 Use center crop for recipe images 2021-11-25 19:34:31 +03:00
Kirill Kamakin 5070f975c4 Use placeholder_recipe in layout designer 2021-11-25 19:07:49 +03:00
Kirill Kamakin d2032380c7 Extract corner radius dimension 2021-11-25 19:06:46 +03:00
Kirill Kamakin 57babcbd1f Fix using trySendBlocking where trySend must be 2021-11-23 23:48:53 +03:00
Kirill Kamakin db2a0b4a94 Wait a second on splash to show image properly 2021-11-23 22:16:22 +03:00