mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Add support for PDFs
This commit is contained in:
		@@ -177,6 +177,10 @@ class _PostTileState extends State<PostTile> {
 | 
				
			|||||||
        postContent = _buildPostWebLink();
 | 
					        postContent = _buildPostWebLink();
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      case PostKind.PDF:
 | 
				
			||||||
 | 
					        postContent = _buildPostPDF();
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      case PostKind.COUNTDOWN:
 | 
					      case PostKind.COUNTDOWN:
 | 
				
			||||||
        postContent = _buildCountDownTimer();
 | 
					        postContent = _buildCountDownTimer();
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
@@ -325,6 +329,16 @@ class _PostTileState extends State<PostTile> {
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Widget _buildPostPDF() {
 | 
				
			||||||
 | 
					    return RaisedButton.icon(
 | 
				
			||||||
 | 
					      onPressed: () {
 | 
				
			||||||
 | 
					        launch(widget.post.fileURL);
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      icon: Icon(Icons.picture_as_pdf),
 | 
				
			||||||
 | 
					      label: Text(tr("PDF")),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget _buildCountDownTimer() {
 | 
					  Widget _buildCountDownTimer() {
 | 
				
			||||||
    return CountdownWidget(
 | 
					    return CountdownWidget(
 | 
				
			||||||
      startTime: widget.post.timeSent,
 | 
					      startTime: widget.post.timeSent,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user