forked from shadowfacts/Tusker
Fix crash when ReportView opened before instance loaded
This commit is contained in:
parent
daf3741c9a
commit
76550d8fb8
|
@ -23,7 +23,7 @@ struct ReportView: View {
|
|||
self.account = mastodonController.persistentContainer.account(for: report.accountID)!
|
||||
self.mastodonController = mastodonController
|
||||
self._report = StateObject(wrappedValue: report)
|
||||
if mastodonController.instance.rules == nil {
|
||||
if mastodonController.instance?.rules == nil {
|
||||
report.reason = .spam
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ struct ReportView: View {
|
|||
}
|
||||
}
|
||||
|
||||
if mastodonController.instance.rules != nil {
|
||||
if mastodonController.instance?.rules != nil {
|
||||
NavigationLink {
|
||||
ReportSelectRulesView(mastodonController: mastodonController, report: report)
|
||||
} label: {
|
||||
|
|
Loading…
Reference in New Issue