fix: reply crate duplicate mention issue. resolve #293

This commit is contained in:
CMK 2021-10-09 16:16:11 +08:00
parent 2ef55bc5ca
commit 7113fc037c
1 changed files with 3 additions and 1 deletions

View File

@ -151,7 +151,9 @@ final class ComposeViewModel: NSObject {
.sorted(by: { $0.index.intValue < $1.index.intValue })
.filter { $0.id != composeAuthor?.id }
for mention in mentions {
mentionAccts.append("@" + mention.acct)
let acct = "@" + mention.acct
guard !mentionAccts.contains(acct) else { continue }
mentionAccts.append(acct)
}
for acct in mentionAccts {
UITextChecker.learnWord(acct)