Don Turner
cfb5c15970
Fix spotless
10 months ago
Don Turner
4acdda6c23
Add unit test for NetowrkTopic mapper
10 months ago
Don Turner
cb10b24c1e
Fix failing UI test, add unit test and refactor
10 months ago
Simon Marquis
85491e0f53
Remove implicit `TemporaryFolder` binding with InMemoryDataStore test module
1 year ago
Simon Marquis
929848aa08
Merge Android & JVM plugins into a single `HiltConventionPlugin`
1 year ago
Tomáš Mlynarič
7a9355482b
Remove forgotten Trace.endSection()
...
Change-Id: Ib6f7678f5f1c4b0f93f1736b6453c649d6f7dc97
1 year ago
Tomáš Mlynarič
5b1ba07f99
Offload connectivity monitor to a background thread
...
Change-Id: I9a2ef7766ae6abc6d8a7c86a4b49ef3c795e446c
1 year ago
Don Turner
4fc5e67d30
Merge pull request #1291 from Jaehwa-Noh/rename
...
Rename Fake to Demo
1 year ago
Simon Marquis
bcdc1a322e
Delete unused `combine` extension in `SyncUtilities.kt`
2 years ago
Jaehwa Noh
c975be2f07
Rename fake to demo.
...
Change-Id: I5b1d7963e623832a766900aa74ef1085aac0cacc
2 years ago
Alex Vanyo
055ed3cc5c
Merge pull request #1275 from Jaehwa-Noh/rename-function
...
Rename function to setNewsResourceBookmarked
2 years ago
Don Turner
7415ae3b46
Add title to READMEs to describe the dependency graph
...
Change-Id: Ifb4b44e67df53ddd8ed048122c6c12a904e61528
2 years ago
Jaehwa Noh
114ab5a713
Fix typo.
...
Change-Id: Id3aed2e3c54660fbbb42bc0c08dea68de0d5230f
2 years ago
Jaehwa Noh
8f46eb84ae
Fix #1270
...
Change-Id: Id9774ad300b04c17cb1d7668c1ab1bac014bf70c
2 years ago
Don Turner
2004c9abca
Update module dependency graphs and add script to create them
...
Change-Id: I7b2ae264ec84491c847a44869934e2f238564c31
2 years ago
Don Turner
951bd07490
Merge pull request #1144 from SimonMarquis/move-fakes-to-data-test-module
...
Move `:core:data` fake repositories to `:core:data-test`
2 years ago
Jaehwa Noh
1ff2722d2e
Remove Insert function
...
- Insert is only used in test.
- Upsert do same thing as Insert.
Change-Id: Ib5f8e693e71c895b83e43f6b51cebdc698bf744b
2 years ago
Tomáš Mlynarič
8e959e9803
Improve converting to kotlin timezone
...
Change-Id: I2af929c341cb274ae6b93bb8dffe696de6ed1c63
2 years ago
Tomáš Mlynarič
77d4f5f57f
Use trySend multiple times
...
Change-Id: Ie00c4180d07fc4bb9d457647f3b7ddadd5a3c032
2 years ago
Simon Marquis
37af179716
Move `:core:data` fake repositories to `:core:data-test`
...
Now that these fake implementations are no longer used in the production source code (only in tests), we can safely extract them out of this module.
Hopefully, we'll later be able to use Kotlin testFixtures for that.
References:
- #709
- #875
2 years ago
Tomáš Mlynarič
251b1bbc2c
Use androidx.tracing everywhere
...
Change-Id: I9a77c4434d271e2e23700823f9f513aa61d177f8
2 years ago
Tomáš Mlynarič
e208bd0bfd
Use kotlinx.datetime.Timezone instead of java ZoneId
...
Change-Id: I62c4d044b319a9b59e06bb42fd12971d992e8628
2 years ago
Tomáš Mlynarič
6c7a136de2
More readable zoneId creation
...
Change-Id: I912dc021554e4886a5d09e63799aa5c81e8fd16a
2 years ago
Tomáš Mlynarič
64a325ae6c
Conflate TimeZoneMonitor emissions
...
Co-authored-by: Alex Vanyo <vanyo@google.com>
2 years ago
Tomáš Mlynarič
c432f74054
Add TimeZoneMonitor to prevent multiple TimeZoneBroadcastReceivers
...
This way, we can save ~1ms per composed item on screen.
Change-Id: Ib9ada3cea53304fca4fb2b36c48c175845bc683d
2 years ago
Don Turner
4843216871
Merge branch 'main' into kotlinify
2 years ago
Simon Marquis
171e2e83f5
Reduce overall build complexity
...
- Reduce the visibility of multiple Hilt `Module`s and implementations of public interfaces
- Correctly configure the visibility of dependencies:
- `api` when it's part of it's public `api`
- `implementation` when it's part of it's internal `implementation`
- Remove unnecessary dependencies in build.gradle.kts files
- Remove unnecessary dependencies provided by plugins
- Remove unnecessary applied plugins (i.e. roborazzi)
- Sort dependencies in `build.gradle.kts`
- Delete unused entries in `libs.versions.toml`
2 years ago
Simon Marquis
6a3a5ea692
Kotlinify codebase
...
- Remove unnecessary nullable types
- Replace no-op method bodies with Unit
- Convert to expression body
- Replace if with when
- Remove braces from 'when' entries
- Remove braces from if statement
- Convert to single line lambda
- oneline if/returns
- Replace 'contains' call with 'in' operator
Following this refactor, it could be great to envision a more "strict" code formatter like ktlint 1.0 (we are currently stuck at 0.48.1)
2 years ago
Don Turner
3d85cd06d0
Merge pull request #958 from McGalanes/main
...
Use typesafe project accessors
2 years ago
Melwin Magalhaes
f470be2860
Add convention plugins to version catalogs
2 years ago
Melwin Magalhaes
d089ccd9d7
Use typesafe project accessors for project modules
2 years ago
Simon Marquis
2bbb982b3a
Migrate from `java` to `kotlin` sourceSet directory
2 years ago
Don Turner
a2c0450965
Merge pull request #925 from SimonMarquis/remove-dispatcher
...
Remove unnecessary dispatcher switch in `DefaultRecentSearchRepository`
2 years ago
Simon Marquis
7f5a8619fe
Remove unnecessary dispatcher switch in `DefaultRecentSearchRepository`
...
As mentioned in the following discussion: https://github.com/android/nowinandroid/discussions/818
Room already takes care of switching dispatchers if the DAO method is correctly annotated with the `suspend` modifier.
2 years ago
Roy Matero
6122d92cf8
Renamed toggle function signature with boolean parameters
...
Change-Id: I0d6c0ed4d4c0ee4bd387e5645fc558970f5f202b
2 years ago
Simon Marquis
642d32bf38
Restore original `type` labels
2 years ago
Simon Marquis
81bec2e367
Replace `NewsResourceType` enum with simpler String type
...
See this discussion for rationale: https://github.com/android/nowinandroid/discussions/901
2 years ago
blackbracken
8dff654571
Call getNewsResourceIds instead of getNewsResources
2 years ago
Simon Marquis
06d07dbca4
Apply changes from review comments
2 years ago
Simon Marquis
769e5dd458
Keep track of matching `Network`s inside `NetworkCallback`
...
This will ensure the connectivity state remains synchronized with the `ConnectivityManager`.
Fixes #714
2 years ago
TJ Dahunsi
56034631b5
Fix tests
...
Change-Id: Ie6b62071d2023e3a7ffe1553ab606e3f6b386a5e
2 years ago
TJ Dahunsi
0d416f2404
Ensure DAO exposes only reactive types
...
Change-Id: I8992ccf6525cd4c5ea9503d532b500e4d310b7fb
2 years ago
Adetunji Dahunsi
3ec9746ce9
Merge pull request #716 from SimonMarquis/SimonMarquis-patch-3
...
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago
James Rose
2bd3bc7bb2
Mark all news resources read on first sync
...
Otherwise, there will be unread articles until the user clicks through
every article that has ever been published.
2 years ago
Simon Marquis
8e39c933bd
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
32698353c5
Extract common code to update the Flow value
2 years ago
Simon Marquis
3fcdda6bb6
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
cbe308f8a2
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
b3a0b43eba
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
5e33c57144
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago