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();
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case PostKind.PDF:
 | 
			
		||||
        postContent = _buildPostPDF();
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case PostKind.COUNTDOWN:
 | 
			
		||||
        postContent = _buildCountDownTimer();
 | 
			
		||||
        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() {
 | 
			
		||||
    return CountdownWidget(
 | 
			
		||||
      startTime: widget.post.timeSent,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user