Skip to content

Commit

Permalink
Fix file shareLinkOffice permission
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin committed Oct 12, 2023
1 parent 6a0ef88 commit 4945b90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,5 @@ class MainActivity : BaseActivity() {

companion object {
private const val SYNCED_FILES_DELETION_FILES_AMOUNT = 10
private const val SECURITY_APP_TOLERANCE = 1 * 60 * 1000 // 1min (ms)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class SelectPermissionBottomSheetDialog : FullScreenBottomSheetDialog() {
var currentPermission: Permission? = null

fun editFileShareLinkOfficePermission(file: File, canEdit: Boolean) = liveData(Dispatchers.IO) {
val body = JsonObject().apply { addProperty(ShareLinkSettings::canEdit.name, canEdit) }
val body = JsonObject().apply { addProperty("can_edit", canEdit) }
val apiResponse = ApiRepository.updateShareLink(file, body)
if (apiResponse.data == true) FileController.updateShareLinkWithRemote(file.id)
emit(apiResponse)
Expand Down

0 comments on commit 4945b90

Please sign in to comment.