Skip to content

Commit 06a7f4e

Browse files
authored
Update wordpress-rs to trunk-e062d94e (#22372)
Pass empty interceptors list to API client constructors following the addition of interceptors support in wordpress-rs. Automattic/wordpress-rs#1041 Changes: - Update `WpApiClient`, `WpLoginClient`, and `WpRequestExecutor` calls to include `interceptors = emptyList()` - Bump wordpress-rs version in libs.versions.toml
1 parent 42e181d commit 06a7f4e

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

WordPress/src/main/java/org/wordpress/android/modules/ApplicationModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
import org.wordpress.android.viewmodel.helpers.ConnectionStatus;
4040
import org.wordpress.android.viewmodel.helpers.ConnectionStatusLiveData;
4141

42+
import java.util.Collections;
43+
4244
import javax.inject.Named;
4345

4446
import dagger.Binds;
@@ -152,6 +154,6 @@ public static RecordingStrategy provideVoiceToContentRecordingStrategy() {
152154

153155
@Provides
154156
public static WpLoginClient provideWpLoginClient() {
155-
return new WpLoginClient();
157+
return new WpLoginClient(Collections.emptyList());
156158
}
157159
}

WordPress/src/main/java/org/wordpress/android/ui/dataview/DataViewViewModel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ open class DataViewViewModel @Inject constructor(
8181
// TODO this is strictly for wp.com sites, we'll need different auth for self-hosted
8282
protected val wpComApiClient: WpComApiClient by lazy {
8383
WpComApiClient(
84-
WpAuthenticationProvider.staticWithAuth(
84+
authProvider = WpAuthenticationProvider.staticWithAuth(
8585
requireNotNull(accountStore.accessToken) { "Access token is required but was null" }.let { token ->
8686
WpAuthentication.Bearer(token = token)
8787
}
88-
)
88+
),
89+
interceptors = emptyList()
8990
)
9091
}
9192

WordPress/src/main/java/org/wordpress/android/ui/jetpackrestconnection/JetpackConnectionHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class JetpackConnectionHelper @Inject constructor(
2828

2929
val delegate = WpApiClientDelegate(
3030
authProvider = createRestAuthProvider(site),
31-
requestExecutor = WpRequestExecutor(),
31+
requestExecutor = WpRequestExecutor(interceptors = emptyList()),
3232
middlewarePipeline = WpApiMiddlewarePipeline(emptyList()),
3333
appNotifier = InvalidAuthNotifier()
3434
)

WordPress/src/main/java/org/wordpress/android/ui/subscribers/AddSubscribersViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class AddSubscribersViewModel @Inject constructor(
4747
WpComApiClient(
4848
WpAuthenticationProvider.staticWithAuth(
4949
WpAuthentication.Bearer(token = accountStore.accessToken!!)
50-
)
50+
),
51+
interceptors = emptyList()
5152
)
5253
}
5354

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ wellsql = '2.0.0'
101101
wordpress-aztec = 'v2.1.4'
102102
wordpress-lint = '2.2.0'
103103
wordpress-persistent-edittext = '1.0.2'
104-
wordpress-rs = 'trunk-3d2dafdc1f8b058b4ed9101673fdf690671da73c'
104+
wordpress-rs = 'trunk-e062d94e66354cad9bd710219f321104782bb6fc'
105105
wordpress-utils = '3.14.0'
106106
automattic-ucrop = '2.2.11'
107107
zendesk = '5.5.1'

libs/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/rs/WpApiClientProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class WpApiClientProvider @Inject constructor(
2929
val client = WpApiClient(
3030
wpOrgSiteApiRootUrl = apiRootUrl,
3131
authProvider = authProvider,
32-
requestExecutor = WpRequestExecutor(uploadListener = uploadListener),
32+
requestExecutor = WpRequestExecutor(uploadListener = uploadListener, interceptors = emptyList()),
3333
appNotifier = object : WpAppNotifier {
3434
override suspend fun requestedWithInvalidAuthentication(requestUrl: String) {
3535
wpAppNotifierHandler.notifyRequestedWithInvalidAuthentication(site)

0 commit comments

Comments
 (0)