use hostname if not null
This commit is contained in:
@@ -352,8 +352,9 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
var host = Uri.parse(urlAttachment.ogScrapeUrl).host;
|
var host = Uri.parse(urlAttachment.ogScrapeUrl).host;
|
||||||
var splitList = host.split('.');
|
var splitList = host.split('.');
|
||||||
var hostName = splitList.length == 3 ? splitList[1] : splitList[0];
|
var hostName = splitList.length == 3 ? splitList[1] : splitList[0];
|
||||||
var hostDisplayName =
|
var hostDisplayName = urlAttachment.authorName?.capitalize() ??
|
||||||
_getWebsiteName(hostName.toLowerCase()) ?? hostName.capitalize();
|
_getWebsiteName(hostName.toLowerCase()) ??
|
||||||
|
hostName.capitalize();
|
||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user