From fceec62370a8ee8ff4995f75e2ac5bab8b507674 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:24:28 -0800 Subject: [PATCH] Refactoring --- .../Sources/ViewModels/View Models/NewStatusViewModel.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ViewModels/Sources/ViewModels/View Models/NewStatusViewModel.swift b/ViewModels/Sources/ViewModels/View Models/NewStatusViewModel.swift index e28893e..261277f 100644 --- a/ViewModels/Sources/ViewModels/View Models/NewStatusViewModel.swift +++ b/ViewModels/Sources/ViewModels/View Models/NewStatusViewModel.swift @@ -79,11 +79,10 @@ public final class NewStatusViewModel: ObservableObject { .filter { $0 != (identity ?? identityContext.identity).account?.username } .map("@".appending)) - if !inReplyTo.isMine { + if !mentions.isEmpty { compositionViewModel.text = mentions.joined(separator: " ").appending(" ") - } else { - compositionViewModel.text = "" } + compositionViewModel.contentWarning = inReplyTo.spoilerText compositionViewModel.displayContentWarning = !inReplyTo.spoilerText.isEmpty } else if let directMessageTo = directMessageTo {