Skip to content

Commit

Permalink
Refine .receiveKey().
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen committed Mar 12, 2024
1 parent 0f04e78 commit 456f926
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Sources/Tekkon/Tekkon_SyllableComposer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,8 @@ public extension Tekkon {
receiveKey(fromPhonabet: translate(key: input))
return
}
if mapArayuruPinyinIntonation.keys.contains(input) {
if let theTone = mapArayuruPinyinIntonation[input] {
intonation = Phonabet(theTone)
}
if let theTone = mapArayuruPinyinIntonation[input] {
intonation = Phonabet(theTone)
} else {
// 為了防止 romajiBuffer 越敲越長帶來算力負擔,這裡讓它在要溢出時自動丟掉最早輸入的音頭。
let maxCount: Int = (parser == .ofWadeGilesPinyin) ? 7 : 6
Expand Down

0 comments on commit 456f926

Please sign in to comment.