forked from zelo72/mastodon-ios
fix: text checker not learn reply post mention word issue
This commit is contained in:
parent
0822b222fc
commit
1d6345b12b
|
@ -71,8 +71,7 @@ final class ComposeViewModel {
|
||||||
|
|
||||||
init(
|
init(
|
||||||
context: AppContext,
|
context: AppContext,
|
||||||
composeKind: ComposeStatusSection.ComposeKind,
|
composeKind: ComposeStatusSection.ComposeKind
|
||||||
initialComposeContent: String? = nil
|
|
||||||
) {
|
) {
|
||||||
self.context = context
|
self.context = context
|
||||||
self.composeKind = composeKind
|
self.composeKind = composeKind
|
||||||
|
@ -87,8 +86,9 @@ final class ComposeViewModel {
|
||||||
if case let .mention(mastodonUserObjectID) = composeKind {
|
if case let .mention(mastodonUserObjectID) = composeKind {
|
||||||
context.managedObjectContext.performAndWait {
|
context.managedObjectContext.performAndWait {
|
||||||
let mastodonUser = context.managedObjectContext.object(with: mastodonUserObjectID) as! MastodonUser
|
let mastodonUser = context.managedObjectContext.object(with: mastodonUserObjectID) as! MastodonUser
|
||||||
let initialComposeContent = "@" + mastodonUser.acct + " "
|
let initialComposeContent = "@" + mastodonUser.acct
|
||||||
self.composeStatusAttribute.composeContent.value = initialComposeContent
|
UITextChecker.learnWord(initialComposeContent)
|
||||||
|
self.composeStatusAttribute.composeContent.value = initialComposeContent + " "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue