Put poll options behind content warnings (#10983)
* Put poll options behind CWs in WebUI * Put polls behind CWs on public pages * Add poll icon to public pages CWs * Revert to not showing an icon in the CW button
This commit is contained in:
		
							parent
							
								
									20dda5cca0
								
							
						
					
					
						commit
						e9ddd5a159
					
				
					 6 changed files with 36 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -13,7 +13,6 @@ import Video from '../../video';
 | 
			
		|||
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
 | 
			
		||||
import classNames from 'classnames';
 | 
			
		||||
import Icon from 'mastodon/components/icon';
 | 
			
		||||
import PollContainer from 'mastodon/containers/poll_container';
 | 
			
		||||
 | 
			
		||||
export default class DetailedStatus extends ImmutablePureComponent {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -107,9 +106,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
 | 
			
		|||
      outerStyle.height = `${this.state.height}px`;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (status.get('poll')) {
 | 
			
		||||
      media = <PollContainer pollId={status.get('poll')} />;
 | 
			
		||||
    } else if (status.get('media_attachments').size > 0) {
 | 
			
		||||
    if (status.get('media_attachments').size > 0) {
 | 
			
		||||
      if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
 | 
			
		||||
        const video = status.getIn(['media_attachments', 0]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue