Don Turner
707117a4f2
Merge branch 'main' into kotlinify
1 year ago
Simon Marquis
f27a2e176e
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`
1 year ago
Simon Marquis
caa482bc71
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)
1 year ago
Don Turner
a381d13199
Merge pull request #958 from McGalanes/main
...
Use typesafe project accessors
1 year ago
Melwin Magalhaes
6247712064
Add convention plugins to version catalogs
1 year ago
Melwin Magalhaes
b1266dc05a
Use typesafe project accessors for project modules
1 year ago
Simon Marquis
a33dafccad
Migrate from `java` to `kotlin` sourceSet directory
1 year ago
Don Turner
d0909a9c8f
Merge pull request #925 from SimonMarquis/remove-dispatcher
...
Remove unnecessary dispatcher switch in `DefaultRecentSearchRepository`
1 year ago
Simon Marquis
0ddcf0b4ab
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.
1 year ago
Roy Matero
4e6cda1965
Renamed toggle function signature with boolean parameters
...
Change-Id: I0d6c0ed4d4c0ee4bd387e5645fc558970f5f202b
1 year ago
Simon Marquis
daa2228132
Restore original `type` labels
1 year ago
Simon Marquis
0377fd8712
Replace `NewsResourceType` enum with simpler String type
...
See this discussion for rationale: https://github.com/android/nowinandroid/discussions/901
1 year ago
blackbracken
805914dade
Call getNewsResourceIds instead of getNewsResources
1 year ago
Simon Marquis
27154ef38a
Apply changes from review comments
2 years ago
Simon Marquis
fecab96e4c
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
dcc36b0228
Fix tests
...
Change-Id: Ie6b62071d2023e3a7ffe1553ab606e3f6b386a5e
2 years ago
TJ Dahunsi
cd6ad7d575
Ensure DAO exposes only reactive types
...
Change-Id: I8992ccf6525cd4c5ea9503d532b500e4d310b7fb
2 years ago
Adetunji Dahunsi
ba1d9e14df
Merge pull request #716 from SimonMarquis/SimonMarquis-patch-3
...
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago
James Rose
2f2dfb00a4
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
ec9155fef9
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
7819a0c6bc
Extract common code to update the Flow value
2 years ago
Simon Marquis
def5c4e881
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
76c249a651
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
f34ee1c01b
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
de6545f5d7
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago
TJ Dahunsi
9562f7707d
Route notification deep link through for you screen, with spotless fixes
2 years ago
TJ Dahunsi
ef97cb941c
Route notification deep link through for you screen
2 years ago
Milosz Moczkowski
c746b6afcd
Merge pull request #598 from takagimeow/fix/clean-up-unused-update-topics
...
Clean up unused updateTopics and updateNewsResources methods
2 years ago
Takeshi Hagikura
b3cdc172cd
Implement search feature ( #685 )
...
Implement search feature
- Add a feature module named "search"
- Add a SearchScreen that is navigated by tapping the search icon at the top left corner
- Add a data layer that takes care of populating the *Fts tables and querying them by a search query
- Add a SearchViewModel that wires up the data layer of the Fts tables with the SearchScreen
The SearchScreen has following features:
- The user is able to type the search query in the TextField
- The search result is displayed as the user types
- When the search result is clicked, it navigates to:
- The InterestsScreen when a topic is clicked
- Chrome custom tab with the URL of the clicked news resource
- When the search result is clicked or the IME is explicitly closed by the user, the current search query in the TextField is saved as recent searches
- Latest recent searches are displayed in the SearchScreen
2 years ago
Adetunji Dahunsi
73a38720d8
Merge pull request #649 from android/tj/backend-requested-sync
...
Wire up backend requested sync
2 years ago
Adetunji Dahunsi
6b834b6f4c
Applied code review suggestions
...
Change-Id: I12fab8e0d27a8a1805e0063054ec3382bebd78f1
2 years ago
Adetunji Dahunsi
b3f2502ec2
Update core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstNewsRepositoryTest.kt
...
Co-authored-by: Don Turner <dturner@users.noreply.github.com>
2 years ago
Adetunji Dahunsi
f86d174c1b
Used more explicit variable names in tests
...
Change-Id: I2e0ebead70441eced05eb786aaa7683bfefa8976
2 years ago
Adetunji Dahunsi
337c940d66
Add comments explaining backend sync and made variable names easier to grok
...
Change-Id: I90cd7444de95efa20bf243a922a772f7849a23ec
2 years ago
Adetunji Dahunsi
022cd92f4c
Update core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstNewsRepository.kt
...
Co-authored-by: Don Turner <dturner@users.noreply.github.com>
2 years ago
Adetunji Dahunsi
05be2855d8
Wire up backend requested sync
...
Change-Id: I1d4485b589c7e94527a2a02f371cd3f030231622
2 years ago
James Rose
93953c2206
Add missing method doc
2 years ago
James Rose
050db2cb72
Merge branch 'main' into jr/track-viewed
2 years ago
James Rose
b49767a88c
Rename getUserNewsResources to observeAll
2 years ago
Milosz Moczkowski
0b0fdbfdbf
Merge branch 'main' into patch-2
2 years ago
Adetunji Dahunsi
08956492c8
Backend triggered sync
...
Change-Id: I53c43b136ebb755f6258b1e815301dddb3b536a3
2 years ago
James Rose
57c13d84bd
Incorporate code review changes: Move UserNewsResourceRepository to data
...
module; move UserNewsResource to model module. Implement unread dot for
bookmarked articles. Keep the flows cold in UserNewsResourceRepository.
2 years ago
Simon Marquis
8ec54d19d8
Sort and group Gradle dependencies thanks to square/gradle-dependencies-sorter
2 years ago
James Rose
9ee2acf327
Add viewed status for news resources to data layer
2 years ago
Adetunji Dahunsi
ebdb8589a6
Merge pull request #608 from android/tunjid-batch-sync
...
Batch sync news resources from remote
2 years ago
Keisuke Takagi
d56d8e1380
Merge branch 'main' of https://github.com/takagimeow/nowinandroid into fix/clean-up-unused-update-topics
2 years ago
Adetunji Dahunsi
8765d3ac57
Fix tests for batched news resource sync
...
Change-Id: I37545eba8618edc936eb12fa38628d98f85f52ed
2 years ago
Adetunji Dahunsi
1e8d1d9810
Spotless fix
...
Thought I was cool enough to edit code in the browser. Spotless said no.
2 years ago
Adetunji Dahunsi
267adfd27f
Batch sync news resources from remote
...
Batch sync news resources from remote to reduce json payload size.
2 years ago
Manuel Vivo
91633af376
Provide a CoroutineScope to fake DataStores
2 years ago