فهرست منبع

Adapt autocompletion to the web UI

Juan Carlos González Cabrero 9 سال پیش
والد
کامیت
a969250b23
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 0
      res/values/strings.xml
  2. 6 1
      src/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java

+ 1 - 0
res/values/strings.xml

@@ -389,6 +389,7 @@
     <string name="search_users_and_groups_hint">Search users and groups</string>
     <string name="share_group_clarification">%1$s (group)</string>
     <string name="share_remote_clarification">%1$s (remote)</string>
+    <string name="share_known_remote_clarification">%1$s ( at %2$s )</string>
 
     <string name="share_sharee_unavailable">Sorry, your server version does not allow share with users within clients.
         \nPlease contact your administrator</string>

+ 6 - 1
src/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java

@@ -197,7 +197,12 @@ public class UsersAndGroupsSearchProvider extends ContentProvider {
                         displayName = getContext().getString(R.string.share_group_clarification, userName);
                         dataUri = Uri.withAppendedPath(groupBaseUri, shareWith);
                     } else if (ShareType.FEDERATED.getValue() == type && federatedShareAllowed) {
-                        displayName = getContext().getString(R.string.share_remote_clarification, shareWith);
+                        if (userName.equals(shareWith)) {
+                            displayName = getContext().getString(R.string.share_remote_clarification, userName);
+                        } else {
+                            displayName = getContext().getString(R.string.share_known_remote_clarification, userName,
+                                    shareWith.split("@")[1]);
+                        }
                         dataUri = Uri.withAppendedPath(remoteBaseUri, shareWith);
                     } else if (ShareType.USER.getValue() == type) {
                         displayName = userName;