prefer server side avatar on quicksy and address book avatar on conversations
This commit is contained in:
		
							parent
							
								
									f63a209881
								
							
						
					
					
						commit
						65c9dd71c7
					
				| @ -67,12 +67,15 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { | ||||
| 		if (avatar != null || cachedOnly) { | ||||
| 			return avatar; | ||||
| 		} | ||||
| 		if (contact.getAvatarFilename() != null) { | ||||
| 		if (contact.getAvatarFilename() != null && QuickConversationsService.isQuicksy()) { | ||||
| 			avatar = mXmppConnectionService.getFileBackend().getAvatar(contact.getAvatarFilename(), size); | ||||
| 		} | ||||
| 		if (avatar == null && contact.getProfilePhoto() != null) { | ||||
| 			avatar = mXmppConnectionService.getFileBackend().cropCenterSquare(Uri.parse(contact.getProfilePhoto()), size); | ||||
| 		} | ||||
| 		if (avatar == null && contact.getAvatarFilename() != null) { | ||||
| 			avatar = mXmppConnectionService.getFileBackend().getAvatar(contact.getAvatarFilename(), size); | ||||
| 		} | ||||
| 		if (avatar == null) { | ||||
| 			avatar = get(contact.getDisplayName(), contact.getJid().asBareJid().toString(), size, false); | ||||
| 		} | ||||
| @ -517,10 +520,12 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { | ||||
| 		Contact contact = user.getContact(); | ||||
| 		if (contact != null) { | ||||
| 			Uri uri = null; | ||||
| 			if (contact.getAvatarFilename() != null) { | ||||
| 			if (contact.getAvatarFilename() != null && QuickConversationsService.isQuicksy()) { | ||||
| 				uri = mXmppConnectionService.getFileBackend().getAvatarUri(contact.getAvatarFilename()); | ||||
| 			} else if (contact.getProfilePhoto() != null) { | ||||
| 				uri = Uri.parse(contact.getProfilePhoto()); | ||||
| 			} else if (contact.getAvatarFilename() != null) { | ||||
| 				uri = mXmppConnectionService.getFileBackend().getAvatarUri(contact.getAvatarFilename()); | ||||
| 			} | ||||
| 			if (drawTile(canvas, uri, left, top, right, bottom)) { | ||||
| 				return true; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch