1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-28 17:51:21 +01:00

Fix comparison of current content with initial content

This commit is contained in:
Jed Fox 2023-06-30 17:38:00 -04:00
parent c7455a20b5
commit dd953d69ea
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1

View File

@ -479,7 +479,9 @@ extension ComposeContentViewModel {
return true return true
} }
// if the trimmed content equal to initial content // if the trimmed content equal to initial content
return content.trimmingCharacters(in: .whitespacesAndNewlines) == self.initialContent let trimmedContent = content.trimmingCharacters(in: .whitespacesAndNewlines)
let initialContent = self.initialContent.trimmingCharacters(in: .whitespacesAndNewlines)
return trimmedContent == initialContent
} }
.assign(to: &$shouldDismiss) .assign(to: &$shouldDismiss)