Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class JetpackConnectionHelper @Inject constructor(
site.wpApiRestUrl ?: "${site.url}/wp-json"

private inner class InvalidAuthNotifier : WpAppNotifier {
override suspend fun requestedWithInvalidAuthentication() {
override suspend fun requestedWithInvalidAuthentication(requestUrl: String) {
appLogWrapper.d(AppLog.T.API, "$TAG: requestedWithInvalidAuthentication")
throw IllegalArgumentException("Invalid credentials")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EditCategoryUseCase @Inject constructor(
existingCategory.slug,
existingCategory.description,
parentCategoryId,
existingCategory.isHierarchical,
existingCategory.postCount
)
val payload = RemoteTermPayload(editedCategory, siteModel)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.selfhostedusers

import uniffi.wp_api.UserRole
import uniffi.wp_api.UserWithEditContext

/**
Expand All @@ -24,7 +25,7 @@ object SampleUsers {
name = "Sample User",
nickname = "User nickname",
registeredDate = "2023-01-01",
roles = listOf("admin"),
roles = listOf(UserRole.Administrator),
slug = "sample-user",
url = "example.com",
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam non quam viverra, viverra est vel, interdum felis. Pellentesque interdum libero quis metus pharetra ullamcorper. Morbi nec libero ligula. Quisque consectetur, purus sit amet lobortis porttitor, ligula ex imperdiet massa, in ullamcorper augue odio sit amet metus. In sollicitudin mauris et risus mollis commodo. Aliquam vel vehicula ante, nec blandit erat. Aenean non turpis porttitor orci fringilla fringilla nec ac nunc. Nulla ultrices urna ut ipsum posuere blandit. Phasellus mauris nulla, tincidunt at leo at, auctor interdum felis. Sed pharetra risus a ullamcorper dictum. Suspendisse pharetra justo molestie risus lobortis facilisis.",
Expand All @@ -45,7 +46,7 @@ object SampleUsers {
name = "Sample User",
nickname = "User nickname",
registeredDate = "2023-01-01",
roles = listOf("contributor"),
roles = listOf(UserRole.Contributor),
slug = "sample-user",
url = "example.com",
)
Expand All @@ -65,7 +66,7 @@ object SampleUsers {
name = "Sample User",
nickname = "User nickname",
registeredDate = "2023-01-01",
roles = listOf("contributor", "editor", "subscriber"),
roles = listOf(UserRole.Contributor, UserRole.Editor, UserRole.Subscriber),
slug = "sample-user",
url = "example.com",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ class PrepublishingCategoriesViewModelTest : BaseUnitTest() {
"cars",
null,
0,
true,
0
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ class CategoryDetailViewModelTest : BaseUnitTest() {
"animals",
null,
0,
true,
0
)
}
Expand All @@ -353,6 +354,7 @@ class CategoryDetailViewModelTest : BaseUnitTest() {
"dog",
null,
1,
true,
0
)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ wiremock = '2.26.3'
wordpress-aztec = 'v2.1.4'
wordpress-lint = '2.2.0'
wordpress-persistent-edittext = '1.0.2'
wordpress-rs = 'trunk-f4e2450ca5545a4909cb08273f37a7f694244921'
wordpress-rs = 'trunk-d0c9eebab77e8701810077ac1fba7d39ef8d121f'
wordpress-utils = '3.14.0'
automattic-ucrop = '2.2.11'
zendesk = '5.5.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TermModel extends Payload<BaseNetworkError> implements Identifiable
@Nullable @Column private String mSlug;
@Nullable @Column private String mDescription;
@Column private long mParentRemoteId;
@Column private boolean mIsHierarchical;
@Column private int mPostCount;

@Deprecated
Expand Down Expand Up @@ -86,6 +87,7 @@ public TermModel(
@Nullable String slug,
@Nullable String description,
long parentRemoteId,
boolean isHierarchical,
int postCount) {
this.mId = id;
this.mLocalSiteId = localSiteId;
Expand All @@ -95,6 +97,7 @@ public TermModel(
this.mSlug = slug;
this.mDescription = description;
this.mParentRemoteId = parentRemoteId;
this.mIsHierarchical = isHierarchical;
this.mPostCount = postCount;
}

Expand Down Expand Up @@ -168,6 +171,14 @@ public void setParentRemoteId(long parentRemoteId) {
mParentRemoteId = parentRemoteId;
}

public boolean isHierarchical() {
return mIsHierarchical;
}

public void setIsHierarchical(boolean hierarchical) {
mIsHierarchical = hierarchical;
}

public int getPostCount() {
return mPostCount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WpApiClientProvider @Inject constructor(
authProvider = authProvider,
requestExecutor = WpRequestExecutor(uploadListener = uploadListener),
appNotifier = object : WpAppNotifier {
override suspend fun requestedWithInvalidAuthentication() {
override suspend fun requestedWithInvalidAuthentication(requestUrl: String) {
wpAppNotifierHandler.notifyRequestedWithInvalidAuthentication(site)
}
}
Expand Down
Loading