From 0c06d91f6bbc7278ad01ef234dc76d3cc6c02a23 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 24 Jun 2020 16:41:01 -0400 Subject: [PATCH] Fix showing instance public timeline --- Tusker/Views/Status/BaseStatusTableViewCell.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index ca7d4520..c589a100 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -143,7 +143,11 @@ class BaseStatusTableViewCell: UITableViewCell { } let reblogDisabled: Bool - switch mastodonController.instance.instanceType { + switch mastodonController.instance?.instanceType { + case nil: + // todo: this handle a race condition in instance public timelines + // a somewhat better solution would be waiting to load the timeline until after the instance is loaded + reblogDisabled = true case .mastodon: reblogDisabled = status.visibility == .private || status.visibility == .direct case .pleroma: