Show invisible badges to query for self
This commit is contained in:
		
							parent
							
								
									44bc90e5ab
								
							
						
					
					
						commit
						c0af911197
					
				| 
						 | 
					@ -94,7 +94,7 @@ public class ConfiguredProfileBadgeConverter implements ProfileBadgeConverter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    final ResourceBundle resourceBundle = resourceBundleFactory.createBundle(BASE_NAME, desiredLocale, control);
 | 
					    final ResourceBundle resourceBundle = resourceBundleFactory.createBundle(BASE_NAME, desiredLocale, control);
 | 
				
			||||||
    List<Badge> badges = accountBadges.stream()
 | 
					    List<Badge> badges = accountBadges.stream()
 | 
				
			||||||
        .filter(accountBadge -> accountBadge.isVisible()
 | 
					        .filter(accountBadge -> (isSelf || accountBadge.isVisible())
 | 
				
			||||||
            && now.isBefore(accountBadge.getExpiration())
 | 
					            && now.isBefore(accountBadge.getExpiration())
 | 
				
			||||||
            && knownBadges.containsKey(accountBadge.getId()))
 | 
					            && knownBadges.containsKey(accountBadge.getId()))
 | 
				
			||||||
        .map(accountBadge -> {
 | 
					        .map(accountBadge -> {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,6 @@ public class SelfBadge extends Badge {
 | 
				
			||||||
  private final boolean visible;
 | 
					  private final boolean visible;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @JsonCreator
 | 
					  @JsonCreator
 | 
				
			||||||
 | 
					 | 
				
			||||||
  public SelfBadge(
 | 
					  public SelfBadge(
 | 
				
			||||||
      @JsonProperty("id") final String id,
 | 
					      @JsonProperty("id") final String id,
 | 
				
			||||||
      @JsonProperty("category") final String category,
 | 
					      @JsonProperty("category") final String category,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue