MediaAttachmentGrid: fix the element not updated
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				/ depoly (push) Successful in 1m19s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	/ depoly (push) Successful in 1m19s
				
			This problem causes "not supported codec"
This commit is contained in:
		
							parent
							
								
									f965bb4002
								
							
						
					
					
						commit
						acde7609ba
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -152,6 +152,7 @@ const MediaAttachmentGrid: Component<{
 | 
			
		|||
              return (
 | 
			
		||||
                <img
 | 
			
		||||
                  data-sort={index}
 | 
			
		||||
                  data-media-type={item().type}
 | 
			
		||||
                  src={item().previewUrl}
 | 
			
		||||
                  width={item().meta?.small?.width}
 | 
			
		||||
                  height={item().meta?.small?.height}
 | 
			
		||||
| 
						 | 
				
			
			@ -165,6 +166,7 @@ const MediaAttachmentGrid: Component<{
 | 
			
		|||
              return (
 | 
			
		||||
                <video
 | 
			
		||||
                  data-sort={index}
 | 
			
		||||
                  data-media-type={item().type}
 | 
			
		||||
                  src={item().url || undefined}
 | 
			
		||||
                  autoplay={settings().autoPlayVideos}
 | 
			
		||||
                  playsinline={settings().autoPlayVideos ? true : undefined}
 | 
			
		||||
| 
						 | 
				
			
			@ -178,6 +180,8 @@ const MediaAttachmentGrid: Component<{
 | 
			
		|||
            case "gifv":
 | 
			
		||||
              return (
 | 
			
		||||
                <video
 | 
			
		||||
                  data-sort={index}
 | 
			
		||||
                  data-media-type={item().type}
 | 
			
		||||
                  src={item().url || undefined}
 | 
			
		||||
                  autoplay={settings().autoPlayGIFs}
 | 
			
		||||
                  controls
 | 
			
		||||
| 
						 | 
				
			
			@ -191,6 +195,14 @@ const MediaAttachmentGrid: Component<{
 | 
			
		|||
              );
 | 
			
		||||
 | 
			
		||||
            case "audio":
 | 
			
		||||
              return (
 | 
			
		||||
                <audio
 | 
			
		||||
                  data-sort={index}
 | 
			
		||||
                  data-media-type={item().type}
 | 
			
		||||
                  src={item().url || undefined}
 | 
			
		||||
                  controls
 | 
			
		||||
                ></audio>
 | 
			
		||||
              );
 | 
			
		||||
            case "unknown":
 | 
			
		||||
              return <div></div>;
 | 
			
		||||
          }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue