Browse Source

Merge pull request #5817 from nextcloud/GroupUserExpire

NC18+: add possibility to set expiration date on user/group shares
Tobias Kaminsky 5 years ago
parent
commit
b73040ec62

+ 5 - 1
src/main/java/com/owncloud/android/ui/adapter/ShareeListAdapter.java

@@ -43,6 +43,7 @@ import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.lib.resources.shares.ShareType;
 import com.owncloud.android.lib.resources.status.OCCapability;
+import com.owncloud.android.lib.resources.status.OwnCloudVersion;
 import com.owncloud.android.services.OperationsService;
 import com.owncloud.android.ui.TextDrawable;
 import com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment;
@@ -252,7 +253,10 @@ public class ShareeListAdapter extends RecyclerView.Adapter<ShareeListAdapter.Us
 
             hideFileListingItem.setVisible(false);
             passwordItem.setVisible(false);
-            expirationDateItem.setVisible(false);
+
+            if (!capabilities.getVersion().isNewerOrEqual(OwnCloudVersion.nextcloud_18)) {
+                expirationDateItem.setVisible(false);
+            }
         }
 
         SharingMenuHelper.setupExpirationDateMenuItem(

+ 1 - 0
src/main/res/layout/file_details_sharing_fragment.xml

@@ -170,6 +170,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/standard_margin"
+            android:paddingRight="@dimen/standard_padding"
             android:orientation="horizontal">
 
             <ImageView