Browse Source

Changes after CR

jabarros 9 years ago
parent
commit
aabdcaa04a

+ 2 - 2
res/values/setup.xml

@@ -24,8 +24,8 @@
     
     <!-- Flags to enable/disable some features -->
     <string name = "send_files_to_other_apps">on</string>
-    <string name = "share_via_link_feature">on</string>
-    <string name = "share_with_users_feature">on</string>
+    <bool name = "share_via_link_feature">true</bool>
+    <bool name = "share_with_users_feature">true</bool>
     
     
     <!-- Colors -->

+ 2 - 2
src/com/owncloud/android/files/FileMenuFilter.java

@@ -182,9 +182,9 @@ public class FileMenuFilter {
 
         // SHARE FILE
         boolean shareViaLinkAllowed = (mContext != null  &&
-                mContext.getString(R.string.share_via_link_feature).equalsIgnoreCase("on"));
+                mContext.getResources().getBoolean(R.bool.share_via_link_feature));
         boolean shareWithUsersAllowed = (mContext != null  &&
-                mContext.getString(R.string.share_with_users_feature).equalsIgnoreCase("on"));
+                mContext.getResources().getBoolean(R.bool.share_with_users_feature));
 
         OCCapability capability = mComponentsGetter.getStorageManager().getCapability(mAccount.name);
         boolean shareApiEnabled  = capability != null &&

+ 2 - 2
src/com/owncloud/android/ui/fragment/ShareFileFragment.java

@@ -868,8 +868,8 @@ public class ShareFileFragment extends Fragment
         LinearLayout shareWithUsersSection = (LinearLayout) view.findViewById(R.id.shareWithUsersSection);
         LinearLayout shareViaLinkSection = (LinearLayout) view.findViewById(R.id.shareViaLinkSection);
 
-        boolean shareViaLinkAllowed = getActivity().getString(R.string.share_via_link_feature).equalsIgnoreCase("on");
-        boolean shareWithUsersAllowed = getActivity().getString(R.string.share_with_users_feature).equalsIgnoreCase("on");
+        boolean shareViaLinkAllowed = getActivity().getResources().getBoolean(R.bool.share_via_link_feature);
+        boolean shareWithUsersAllowed = getActivity().getResources().getBoolean(R.bool.share_with_users_feature);
 
         // Hide share via link section if it is not enabled
         if (!shareViaLinkAllowed) {