mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	Removed comma separator (#5261)
* Removed comma separator from file descriptions * Removed a redundant line that deleted the last comma of the descriptions * Added a line to formatDescriptions that replaces every instance of "}}, " with "}}" to remove the comma between descriptions. * Specified separator as an empty string instead of default value ", " for .joinToString method. Deleted previous fix using .replace method. * Restored buffer.replace() in updateDescription
This commit is contained in:
		
							parent
							
								
									cdb2e4278c
								
							
						
					
					
						commit
						3f529e674f
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -111,6 +111,6 @@ data class Contribution constructor( | |||
|          */ | ||||
|         fun formatDescriptions(descriptions: List<UploadMediaDetail>) = | ||||
|             descriptions.filter { it.descriptionText.isNotEmpty() } | ||||
|                 .joinToString { "{{${it.languageCode}|1=${it.descriptionText}}}" } | ||||
|                 .joinToString(separator = "") { "{{${it.languageCode}|1=${it.descriptionText}}}" } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -151,7 +151,7 @@ class DescriptionEditActivity : BaseActivity(), UploadMediaDetailAdapter.EventLi | |||
|                     buffer.append(uploadDetails.languageCode) | ||||
|                     buffer.append("|1=") | ||||
|                     buffer.append(uploadDetails.descriptionText) | ||||
|                     buffer.append("}}, ") | ||||
|                     buffer.append("}}") | ||||
|                 } | ||||
|             } | ||||
|             buffer.replace(", $".toRegex(), "") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 paco-arana
						paco-arana