diff --git a/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailSharingFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailSharingFragmentIT.kt index 3314ec28ac..504fb60b4c 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailSharingFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailSharingFragmentIT.kt @@ -43,13 +43,13 @@ import com.owncloud.android.AbstractIT import com.owncloud.android.R import com.owncloud.android.datamodel.OCFile import com.owncloud.android.lib.resources.shares.OCShare -import com.owncloud.android.lib.resources.shares.OCShare.CREATE_PERMISSION_FLAG -import com.owncloud.android.lib.resources.shares.OCShare.DELETE_PERMISSION_FLAG -import com.owncloud.android.lib.resources.shares.OCShare.MAXIMUM_PERMISSIONS_FOR_FILE -import com.owncloud.android.lib.resources.shares.OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER -import com.owncloud.android.lib.resources.shares.OCShare.NO_PERMISSION -import com.owncloud.android.lib.resources.shares.OCShare.READ_PERMISSION_FLAG -import com.owncloud.android.lib.resources.shares.OCShare.SHARE_PERMISSION_FLAG +import com.owncloud.android.lib.resources.shares.OCShare.Companion.CREATE_PERMISSION_FLAG +import com.owncloud.android.lib.resources.shares.OCShare.Companion.DELETE_PERMISSION_FLAG +import com.owncloud.android.lib.resources.shares.OCShare.Companion.MAXIMUM_PERMISSIONS_FOR_FILE +import com.owncloud.android.lib.resources.shares.OCShare.Companion.MAXIMUM_PERMISSIONS_FOR_FOLDER +import com.owncloud.android.lib.resources.shares.OCShare.Companion.NO_PERMISSION +import com.owncloud.android.lib.resources.shares.OCShare.Companion.READ_PERMISSION_FLAG +import com.owncloud.android.lib.resources.shares.OCShare.Companion.SHARE_PERMISSION_FLAG import com.owncloud.android.lib.resources.shares.ShareType import com.owncloud.android.ui.activity.FileDisplayActivity import com.owncloud.android.ui.fragment.util.SharingMenuHelper diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCShareToOCFileConverter.kt b/app/src/main/java/com/owncloud/android/ui/adapter/OCShareToOCFileConverter.kt index d86dd9e147..f0e9828a3f 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCShareToOCFileConverter.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCShareToOCFileConverter.kt @@ -38,7 +38,9 @@ object OCShareToOCFileConverter { */ @JvmStatic fun buildOCFilesFromShares(shares: List): List { - val groupedByPath: Map> = shares.groupBy { it.path } + val groupedByPath: Map> = shares + .filter { it.path != null } + .groupBy { it.path!! } return groupedByPath .map { (path: String, shares: List) -> buildOcFile(path, shares) } .sortedByDescending { it.firstShareTimestamp } diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailsSharingProcessFragment.kt b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailsSharingProcessFragment.kt index e3be7adefd..513119a59a 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailsSharingProcessFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailsSharingProcessFragment.kt @@ -146,7 +146,7 @@ class FileDetailsSharingProcessFragment : if (it.containsKey(ARG_SHARE_TYPE)) { shareType = it.getSerializable(ARG_SHARE_TYPE) as ShareType } else if (share != null) { - shareType = share!!.shareType + shareType = share!!.shareType!! } shareProcessStep = it.getInt(ARG_SCREEN_TYPE, SCREEN_TYPE_PERMISSION) diff --git a/build.gradle b/build.gradle index ead59e73a6..d50ca94252 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { daggerVersion = "2.45" markwonVersion = "4.6.2" prismVersion = "2.0.0" - androidLibraryVersion = "master-SNAPSHOT" + androidLibraryVersion = "ac2c4ff57a152675986657e900f0fb03033f060d" mockitoVersion = "4.11.0" mockitoKotlinVersion = "4.1.0" mockkVersion = "1.13.3"