mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Fix theming issue
This commit is contained in:
		@@ -33,27 +33,27 @@ class TextWidget extends StatelessWidget {
 | 
				
			|||||||
  Widget build(BuildContext context) {
 | 
					  Widget build(BuildContext context) {
 | 
				
			||||||
    if (this.content.isNull || this.content.isEmpty) return Text("");
 | 
					    if (this.content.isNull || this.content.isEmpty) return Text("");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    var usedStyle = style == null ? Theme.of(context).textTheme.body1 : style;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var content = this.content.parsedString;
 | 
					    var content = this.content.parsedString;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*// Parse BBcode
 | 
					    /*// Parse BBcode
 | 
				
			||||||
    if (parseBBcode)
 | 
					    if (parseBBcode)
 | 
				
			||||||
      return BBCodeParsedWidget(
 | 
					      return BBCodeParsedWidget(
 | 
				
			||||||
        text: content,
 | 
					        text: content,
 | 
				
			||||||
        parseCallback: (style, text) => _parseLinks(context, text, style),
 | 
					        parseCallback: (style, text) => _parseLinks(context, text, usedStyle),
 | 
				
			||||||
      );*/
 | 
					      );*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Just parse link
 | 
					    // Just parse link
 | 
				
			||||||
    return RichText(
 | 
					    return RichText(
 | 
				
			||||||
      textAlign: textAlign,
 | 
					      textAlign: textAlign,
 | 
				
			||||||
      text: TextSpan(children: _parseLinks(context, content, style)),
 | 
					      text: TextSpan(children: _parseLinks(context, content, usedStyle)),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Sub parse function
 | 
					  /// Sub parse function
 | 
				
			||||||
  List<InlineSpan> _parseLinks(
 | 
					  List<InlineSpan> _parseLinks(
 | 
				
			||||||
      BuildContext context, String text, TextStyle style) {
 | 
					      BuildContext context, String text, TextStyle style) {
 | 
				
			||||||
    if (style == null) style = TextStyle();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    var buff = StringBuffer();
 | 
					    var buff = StringBuffer();
 | 
				
			||||||
    final list = new List<InlineSpan>();
 | 
					    final list = new List<InlineSpan>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user