Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cb593d0
fix(deps): update okio to v3.10.1
renovate[bot] Jan 7, 2025
5b377ac
Merge pull request #109 from Pocket/renovate/okio
renovate[bot] Jan 7, 2025
983e88d
Merge pull request #111 from Pocket/beta
marcin-kozinski Jan 8, 2025
62ede75
build(git): migrate a kotlin script hook to main.kts
marcin-kozinski Dec 19, 2024
14686e0
Merge pull request #112 from Pocket/main-kts
marcin-kozinski Jan 8, 2025
ad76127
build(git): avoid calling bash from kotlin called from bash
marcin-kozinski Jan 8, 2025
56a08cc
Merge pull request #113 from Pocket/avoid-bash-kotlin-bash-sandwich
marcin-kozinski Jan 8, 2025
4b4a321
fix(deps): update okio to v3.10.2
renovate[bot] Jan 8, 2025
9e247f4
Merge pull request #114 from Pocket/renovate/okio
renovate[bot] Jan 8, 2025
5bf1eb6
chore(renovate): migrate config to JSON5 step 1
marcin-kozinski Jan 9, 2025
ed2685e
chore(renovate): migrate config to JSON5 step 2
marcin-kozinski Jan 9, 2025
e92e437
fix(home): fix see all sometimes opening empty screen
marcin-kozinski Jan 9, 2025
6d44f0b
Merge pull request #115 from Pocket/renovate/reconfigure
marcin-kozinski Jan 9, 2025
0ac7678
fix(credits): swapping to a github username
bassrock Jan 9, 2025
7015f84
fix(deps): update com.android.tools.build:gradle to v8.8.0
renovate[bot] Jan 9, 2025
d3fa307
Merge pull request #118 from Pocket/renovate/com.android.tools.build-…
renovate[bot] Jan 9, 2025
bff016c
fix(deps): update dagger to v2.55
renovate[bot] Jan 10, 2025
de4df1e
Merge pull request #120 from Pocket/renovate/dagger
renovate[bot] Jan 10, 2025
def09ef
Merge pull request #116 from Pocket/fix-slate-details
marcin-kozinski Jan 10, 2025
8c2e0cf
build(renovate): configure renovate to update java version
marcin-kozinski Jan 10, 2025
8c28abd
Merge pull request #121 from Pocket/renovate/opt-in-java
marcin-kozinski Jan 10, 2025
40a34ff
chore(deps): update dependency java to v21
renovate[bot] Jan 10, 2025
c60d1b9
Merge pull request #123 from Pocket/renovate/java-21.x
marcin-kozinski Jan 10, 2025
f30fd0d
Merge pull request #117 from Pocket/bassrock-patch-1
marcin-kozinski Jan 13, 2025
45cfd81
build(renovate): add custom datasource for r8 versions
marcin-kozinski Jan 13, 2025
c35a190
Merge pull request #124 from Pocket/renovate/reconfigure
marcin-kozinski Jan 13, 2025
70f9c0b
build(renovate): override r8 registry urls detected by gradle manager
marcin-kozinski Jan 13, 2025
584d975
Merge pull request #125 from Pocket/renovate/reconfigure
marcin-kozinski Jan 13, 2025
f625b7a
fix(di): enable recommended dagger compiler flags
marcin-kozinski Jan 13, 2025
979ab4e
chore(deps): update com.android.tools:r8 to v8.8.18
marcin-kozinski Jan 13, 2025
df9db77
Merge pull request #126 from Pocket/dagger/use-binding-graph-fix
marcin-kozinski Jan 13, 2025
8189405
Merge pull request #127 from Pocket/renovate/r8-8.8
marcin-kozinski Jan 13, 2025
0647460
build(renovate): switch r8 data source to html to also capture digest
marcin-kozinski Jan 14, 2025
635a596
Merge pull request #128 from Pocket/renovate/reconfigure
marcin-kozinski Jan 14, 2025
4313c51
fix(deps): update com.android.tools:r8 to v8.8.26
renovate[bot] Jan 14, 2025
41fb579
Merge pull request #129 from Pocket/renovate/com.android.tools-r8-8.x
renovate[bot] Jan 14, 2025
1829f65
fix(deps): update com.android.tools:r8 to v8.8.27
renovate[bot] Jan 14, 2025
817a51f
Merge pull request #130 from Pocket/renovate/com.android.tools-r8-8.x
renovate[bot] Jan 14, 2025
e97990c
chore(android gradle plugin): use recommended api for supported locales
marcin-kozinski Jan 15, 2025
9ed5e74
Merge pull request #131 from Pocket/agp-res-config-deprecation
marcin-kozinski Jan 15, 2025
7fe1f96
chore(java): fix missing deprecated annotation warnings
marcin-kozinski Jan 15, 2025
8cf0c77
Merge pull request #132 from Pocket/fix-javac-deprecation-warnings
marcin-kozinski Jan 15, 2025
d596959
fix(deps): update appcenter to v5.0.6
renovate[bot] Jan 15, 2025
450787f
Merge pull request #134 from Pocket/renovate/appcenter
renovate[bot] Jan 15, 2025
1e9513a
fix(deps): update androidx.activity to v1.10.0
renovate[bot] Jan 15, 2025
399eee0
fix(deps): update androidx.compose:compose-bom to v2025
renovate[bot] Jan 15, 2025
6d4c174
Merge pull request #135 from Pocket/renovate/androidx.activity
renovate[bot] Jan 15, 2025
fcf03c1
build(lint): ignore unused resources in translated strings
marcin-kozinski Jan 16, 2025
c920646
Merge pull request #137 from Pocket/configure-unused-resources-check
marcin-kozinski Jan 16, 2025
bea17dc
fix(notes): add notes to saves filters
marcin-kozinski Jan 15, 2025
bf66071
Merge pull request #133 from Pocket/notes-filter
marcin-kozinski Jan 16, 2025
bc300fb
Merge pull request #136 from Pocket/renovate/androidx.compose-compose…
marcin-kozinski Jan 16, 2025
b78baf6
fix(deps): update com.google.firebase:firebase-bom to v33.8.0
renovate[bot] Jan 17, 2025
36a011e
Merge pull request #138 from Pocket/renovate/com.google.firebase-fire…
renovate[bot] Jan 17, 2025
a0ede74
fix(deps): update com.snowplowanalytics:snowplow-android-tracker to v…
renovate[bot] Jan 20, 2025
717a466
Merge pull request #139 from Pocket/renovate/com.snowplowanalytics-sn…
renovate[bot] Jan 20, 2025
aef30f0
fix(deps): update io.sentry:sentry-bom to v7.20.1
renovate[bot] Jan 20, 2025
da0707f
Merge pull request #140 from Pocket/renovate/io.sentry-sentry-bom-7.x
renovate[bot] Jan 20, 2025
80e7ffc
chore(ci): prepare release [skip ci]
max-pkt-ci Jan 21, 2025
70c49b4
Merge pull request #141 from Pocket/release-8.32.0
marcin-kozinski Jan 21, 2025
f2a30c7
fix(deps): downgrade r8 to v8.8.18
marcin-kozinski Jan 30, 2025
49498e1
Merge pull request #169 from Pocket/downgrade-r8
marcin-kozinski Jan 31, 2025
631b24b
chore(ci): prepare release [skip ci]
marcin-kozinski Jan 31, 2025
a6e4c40
Merge pull request #170 from Pocket/release-8.32.1
marcin-kozinski Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17
21
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Many thanks for your contributions and the years spent working together!
* Mike Herbig
* John Oberhauser
* Devota Aabel
* Daniel Brooks
* [@bassrock](https://github.com/bassrock)
* Tim Choh
* Thomas Ezan
* James Yopp
Expand Down
37 changes: 15 additions & 22 deletions Pocket/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ plugins {
}

val versionMajor = 8 // Max value of 200
val versionMinor = 31 // Max of two digits
val versionPatch = 0 // Max of two digits
val versionMinor = 32 // Max of two digits
val versionPatch = 1 // Max of two digits
val versionBuild = 0 // Max of three digits

// See usage and more details below, but this produces version numbers like 6.2.4.1 and codes like 60204001
Expand Down Expand Up @@ -63,30 +63,15 @@ android {
versionName = "$versionMajor.$versionMinor.$versionPatch.$versionBuild"

vectorDrawables.useSupportLibrary = true // https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.m9i38hx27
resourceConfigurations.addAll(
arrayOf(
"de",
"es",
"es-rES",
"fr",
"fr-rCA",
"it",
"ja",
"ko",
"nl",
"pl",
"pt",
"pt-rBR",
"ru",
"zh",
"zh-rCN",
"zh-rTW"
)
)

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

androidResources {
localeFilters += listOf("de", "es", "es-rES", "fr", "fr-rCA", "it", "ja", "ko", "nl", "pl", "pt", "pt-rBR", "ru", "zh", "zh-rCN", "zh-rTW")
generateLocaleConfig = true
}

flavorDimensions.add(FlavorDimensions.TARGET)
productFlavors {
// Development
Expand Down Expand Up @@ -346,4 +331,12 @@ dependencies {
implementation(libs.sentry.okhttp)
}

kapt {
arguments {
arg("dagger.fastInit", "enabled")
arg("dagger.useBindingGraphFix", "ENABLED")
arg("dagger.ignoreProvisionKeyWildcards", "ENABLED")
}
}

registerCopyMergedManifestTask()
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package="com.ideashower.readitlater.pro"
android:installLocation="auto"
android:targetSandboxVersion="2"
android:versionCode="83100000"
android:versionName="8.31.0.0" >
android:versionCode="83201000"
android:versionName="8.32.1.0" >

<uses-sdk
android:minSdkVersion="23"
Expand Down Expand Up @@ -84,7 +84,7 @@
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/nm_icon"
android:localeConfig="@xml/locale_config"
android:localeConfig="@xml/_generated_res_locale_config"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/Theme.PocketDefault" >

Expand Down
1 change: 0 additions & 1 deletion Pocket/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/nm_icon"
android:theme="@style/Theme.PocketDefault"
android:localeConfig="@xml/locale_config"
android:networkSecurityConfig="@xml/network_security_config">

<!-- Declaring support for larger aspect ratios than the default 1.86 (including Galaxy S8). see https://android-developers.googleblog.com/2017/03/update-your-app-to-take-advantage-of.html -->
Expand Down
4 changes: 2 additions & 2 deletions Pocket/src/main/java/com/pocket/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void onCreate() {
"Help with Pocket",
message,
true, true,
new ErrorReport(t),
new ErrorReport(t, message),
null));

// Note: Recompile and Reverse Engineer Detection is currently hidden in Assets.start():
Expand Down Expand Up @@ -276,9 +276,9 @@ public static App from(Context context) {
/**
* Convenience method for getting a string resource.
*
* @param id
* @deprecated access from a context you get in a constructor or parameter, avoid static access
*/
@Deprecated
public static String getStringResource(int id) {
if (id == 0) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions Pocket/src/main/java/com/pocket/app/home/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Home {
corpusRecommendationId: String?,
)
fun onSeeAllRecommendationsClicked(
slateId: String,
index: Int,
slateTitle: String
)
fun onSaveClicked(url: String, isSaved: Boolean, corpusRecommendationId: String?)
Expand Down Expand Up @@ -70,7 +70,7 @@ class Home {
data object GoToMyList : Event()

data class GoToSlateDetails(
val slateId: String,
val index: Int,
) : Event()

data class GoToTopicDetails(
Expand Down
2 changes: 1 addition & 1 deletion Pocket/src/main/java/com/pocket/app/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class HomeFragment : AbsPocketFragment() {
}
is Home.Event.GoToSlateDetails -> {
findNavController().navigateSafely(
HomeFragmentDirections.goToSlateDetails(event.slateId)
HomeFragmentDirections.goToSlateDetails(event.index)
)
}
is Home.Event.GoToTopicDetails -> {
Expand Down
14 changes: 4 additions & 10 deletions Pocket/src/main/java/com/pocket/app/home/HomeViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ class HomeViewModel @Inject constructor(
// Report and filter out.
errorHandler.reportOnProductionOrThrow(RuntimeException(
"Slate is empty: " + listOf(
"id = ${slate.id}",
"title = ${slate.title}",
"locale = $localeString",
)
Expand Down Expand Up @@ -287,9 +286,9 @@ class HomeViewModel @Inject constructor(
)
}

override fun onSeeAllRecommendationsClicked(slateId: String, slateTitle: String) {
override fun onSeeAllRecommendationsClicked(index: Int, slateTitle: String) {
tracker.track(HomeEvents.slateSeeAllClicked(slateTitle = slateTitle))
_events.tryEmit(Home.Event.GoToSlateDetails(slateId))
_events.tryEmit(Home.Event.GoToSlateDetails(index))
}

override fun onTopicClicked(topicId: String, topicTitle: String) {
Expand Down Expand Up @@ -380,10 +379,7 @@ class HomeViewModel @Inject constructor(
val title: String?,
val subheadline: String?,
val recommendations: List<RecommendationUiState>,
) {
// Exclude slate id from `.equals()` etc., because it's not stable.
lateinit var slateId: String
}
)

private fun DomainSlate.toRecommendationSlateUiState(
stringLoader: StringLoader,
Expand All @@ -394,9 +390,7 @@ class HomeViewModel @Inject constructor(
recommendations = recommendations
.map { it.toRecommendationUiState(stringLoader) }
.take(recommendationsPerSlate)
).apply {
slateId = id
}
)


data class TopicUiState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SlateDetailsFragment : DetailsFragment() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
viewModel.onInitialized(args.slateId)
viewModel.onInitialized(args.index)
}

override fun goToReader(event: DetailsViewModel.Event.GoToReader) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ class SlateDetailsViewModel @Inject constructor(
itemRepository = itemRepository,
save = save,
tracker = tracker,
), SlateDetailsInteractions {
) {

private val localeString = locale.toString()

override fun onInitialized(slateId: String) {
setupSlateCollector(slateId)
fun onInitialized(index: Int) {
setupSlateCollector(index)
_uiState.edit {
copy(
screenState = ScreenState.Recommendations
)
}
}

private fun setupSlateCollector(slateId: String) {
private fun setupSlateCollector(index: Int) {
viewModelScope.launch {
homeRepository.getLineup(localeString).collect { lineup ->
val slate = lineup.find { it.id == slateId }
val slate = lineup.getOrNull(index)
_uiState.edit {
copy(
title = slate?.title ?: "",
Expand Down Expand Up @@ -85,7 +85,3 @@ class SlateDetailsViewModel @Inject constructor(
)
}
}

interface SlateDetailsInteractions {
fun onInitialized(slateId: String)
}
16 changes: 6 additions & 10 deletions Pocket/src/main/java/com/pocket/app/home/slates/SlatesAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class SlatesAdapter(

override fun onBindViewHolder(holder: ViewHolder, position: Int) =
when (holder) {
is SlateViewHolder -> holder.bind(getItem(position))
is SlatesTabletViewHolder -> holder.bind(getItem(position))
is SlateViewHolder -> holder.bind(getItem(position), position)
is SlatesTabletViewHolder -> holder.bind(getItem(position), position)
else -> {}
}

Expand Down Expand Up @@ -84,7 +84,7 @@ class SlatesAdapter(
binding.minorCardRecyclerView.itemAnimator = null
}

fun bind(state: HomeViewModel.RecommendationSlateUiState) {
fun bind(state: HomeViewModel.RecommendationSlateUiState, position: Int) {
binding.title.text = state.title
if (state.subheadline != null) {
binding.subtitle.text = state.subheadline
Expand All @@ -93,9 +93,7 @@ class SlatesAdapter(
}
binding.slateSeeAllLayout.apply {
setOnClickListener {
if (state.slateId.isNotBlank()) {
viewModel.onSeeAllRecommendationsClicked(state.slateId, state.title.orEmpty())
}
viewModel.onSeeAllRecommendationsClicked(position, state.title.orEmpty())
}
engageable.uiEntityComponentDetail = state.title
}
Expand Down Expand Up @@ -139,17 +137,15 @@ class SlatesAdapter(
binding.minorCardRecyclerView.itemAnimator = null
}

fun bind(state: HomeViewModel.RecommendationSlateUiState) {
fun bind(state: HomeViewModel.RecommendationSlateUiState, position: Int) {
binding.title.text = state.title
if (state.subheadline != null) {
binding.subtitle.text = state.subheadline
} else {
binding.subtitle.visibility = GONE
}
binding.seeAllLayout.setOnClickListener {
if (state.slateId.isNotBlank()) {
viewModel.onSeeAllRecommendationsClicked(state.slateId, state.title.orEmpty())
}
viewModel.onSeeAllRecommendationsClicked(position, state.title.orEmpty())
}

// first item goes to the hero card
Expand Down
13 changes: 10 additions & 3 deletions Pocket/src/main/java/com/pocket/app/list/MyListFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ import com.pocket.app.list.add.AddUrlBottomSheetFragment
import com.pocket.app.list.bulkedit.BulkEditListItemAnimator
import com.pocket.app.list.bulkedit.BulkEditOverflowBottomSheetFragment
import com.pocket.app.list.filter.FilterBottomSheetFragment
import com.pocket.app.list.list.*
import com.pocket.app.list.list.MyListAdapter
import com.pocket.app.list.list.MyListPagingScrollListener
import com.pocket.app.list.list.loading.SkeletonListFadeAnimator
import com.pocket.app.list.list.overflow.ItemOverflowBottomSheetFragment
import com.pocket.app.list.notes.NotesList
import com.pocket.app.list.search.RecentSearchAdapter
import com.pocket.app.list.tags.TagBottomSheetFragment
import com.pocket.app.premium.Premium
Expand Down Expand Up @@ -70,8 +72,6 @@ class MyListFragment : AbsPocketFragment() {
// used to remember the scroll position when coming back to this screen
private var recyclerViewState: Parcelable? = null

override fun getActionViewName(): CxtView = CxtView.LIST

override fun getScreenIdentifierString(): String = "saves"

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -94,6 +94,7 @@ class MyListFragment : AbsPocketFragment() {
super.onViewCreated(view, savedInstanceState)
setupListView()
setupSearchList()
setupNotesList()
fxaFeature.showMigrationMessage(activity)
setupUiListeners()
SkeletonListFadeAnimator(binding.skeletonList, viewLifecycleOwner, viewModel)
Expand Down Expand Up @@ -276,6 +277,12 @@ class MyListFragment : AbsPocketFragment() {
)
}

private fun setupNotesList() {
binding.notes.setContent {
NotesList()
}
}

// this could be refactored to be in the view model
@Suppress("MagicNumber")
private fun setupContinueReading() {
Expand Down
Loading