*/\r
private AbstractImagePrototype getFileIcon(FileResource file) {\r
String mimetype = file.getContentType();\r
- boolean shared = file.isShared();\r
+ boolean shared=false;\r
+ Folders folders = GSS.get().getFolders();\r
+ if(folders.getCurrent() != null && folders.isOthersSharedItem(folders.getCurrent())){\r
+ DnDTreeItem otherUser = (DnDTreeItem) folders.getUserOfSharedItem(folders.getCurrent());\r
+ if(otherUser==null)\r
+ shared = false;\r
+ else{\r
+ String uname = otherUser.getOtherUserResource().getUsername();\r
+ if(uname==null)\r
+ uname = ((DnDTreeItem)folders.getSharesItem()).getOthersResource().getUsernameOfUri(otherUser.getOtherUserResource().getUri());\r
+ if(uname != null)\r
+ shared = file.isShared();\r
+ }\r
+ }\r
+ else\r
+ shared = file.isShared();\r
if (mimetype == null)\r
return shared ? AbstractImagePrototype.create(images.documentShared()) : AbstractImagePrototype.create(images.document());\r
mimetype = mimetype.toLowerCase();\r
updateFileCache(clearSelection);\r
else if (GSS.get().getFolders().getCurrent() != null) {\r
final DnDTreeItem folderItem = (DnDTreeItem) GSS.get().getFolders().getCurrent();\r
- if (folderItem.getFolderResource() != null) {\r
+ if(GSS.get().getFolders().isFileItem(folderItem) || GSS.get().getFolders().isMySharedItem(folderItem) || GSS.get().getFolders().isOthersSharedItem(folderItem)){\r
update(true);\r
GetCommand<FolderResource> gf = new GetCommand<FolderResource>(FolderResource.class, folderItem.getFolderResource().getUri(),folderItem.getFolderResource()) {\r
\r