Skip to content

Commit

Permalink
Add missing no_avatar_default to api calls that return users
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Feb 28, 2024
1 parent 2a84287 commit d03602c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ object ApiRepository : ApiRepositoryCore() {
forFileList: Boolean,
okHttpClient: OkHttpClient = HttpClient.okHttpClientLongTimeout,
): ApiResponse<ArrayList<FileActivity>> {
val queries = if (forFileList) "&depth=children&from_date=${file.responseAt}&$activitiesWithExtraQuery" else "&with=user"
val queries = if (forFileList) {
"&depth=children&from_date=${file.responseAt}&$activitiesWithExtraQuery"
} else {
"&no_avatar_default=1&with=user"
}
val url = "${ApiRoutes.getFileActivities(file)}?${pagination(page)}$queries$ACTIONS" +
if (forFileList) "" else ADDITIONAL_ACTIONS

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/infomaniak/drive/data/api/ApiRoutes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object ApiRoutes {

fun fileInvitationAccess(file: File, invitationId: Int) = "${driveURL(file.driveId)}/files/invitations/$invitationId"

fun getFileShare(file: File) = "${accessUrl(file)}?with=user"
fun getFileShare(file: File) = "${accessUrl(file)}?no_avatar_default=1&with=user"

fun checkFileShare(file: File) = "${accessUrl(file)}/check"

Expand Down Expand Up @@ -112,7 +112,7 @@ object ApiRoutes {

/** Comment */
//region Comment
private const val withComments = "with=user,likes,responses,responses.user,responses.likes"
private const val withComments = "no_avatar_default=1&with=user,likes,responses,responses.user,responses.likes"

fun fileComments(file: File) = "${fileURL(file)}/comments?$withComments"

Expand Down

0 comments on commit d03602c

Please sign in to comment.