[Mangadex] Fix uploader username handling (#12096)
This commit is contained in:
		
							parent
							
								
									9ebac7a263
								
							
						
					
					
						commit
						d74e4708d7
					
				| @ -6,7 +6,7 @@ ext { | ||||
|     extName = 'MangaDex' | ||||
|     pkgNameSuffix = 'all.mangadex' | ||||
|     extClass = '.MangaDexFactory' | ||||
|     extVersionCode = 160 | ||||
|     extVersionCode = 161 | ||||
|     isNsfw = true | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -331,11 +331,7 @@ class MangaDexHelper(private val lang: String) { | ||||
|                             ) | ||||
|                         } | ||||
|                         .mapNotNull { it.attributes!!.username } | ||||
| 
 | ||||
|                     users.joinToString( | ||||
|                         " & ", | ||||
|                         if (users.isNotEmpty()) intl.uploadedBy(users.toString()) else "" | ||||
|                     ) | ||||
|                     if (users.isNotEmpty()) intl.uploadedBy(users) else "" | ||||
|                 } | ||||
|                 .ifEmpty { intl.noGroup } // "No Group" as final resort | ||||
| 
 | ||||
|  | ||||
| @ -636,9 +636,9 @@ class MangaDexIntl(val lang: String) { | ||||
|         else -> "Unable to process Chapter request. HTTP code: $code" | ||||
|     } | ||||
| 
 | ||||
|     fun uploadedBy(user: String): String = when (availableLang) { | ||||
|         BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Enviado por $user" | ||||
|         else -> "Uploaded by $user" | ||||
|     fun uploadedBy(users: List<String>): String = when (availableLang) { | ||||
|         BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Enviado por ${users.joinToString(" & ")}" | ||||
|         else -> "Uploaded by ${users.joinToString(" & ")}" | ||||
|     } | ||||
| 
 | ||||
|     val noGroup: String = when (availableLang) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 FlaminSarge
						FlaminSarge