feat: add keyboard click sound for custom emoji picker

This commit is contained in:
CMK 2021-06-07 14:30:42 +08:00
parent 02f9a15069
commit 5983455849
3 changed files with 11 additions and 2 deletions

View File

@ -12,7 +12,7 @@
<key>CoreDataStack.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>16</integer>
<integer>15</integer>
</dict>
<key>Mastodon - RTL.xcscheme_^#shared#^_</key>
<dict>
@ -32,7 +32,7 @@
<key>NotificationService.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>15</integer>
<integer>16</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

View File

@ -1031,6 +1031,9 @@ extension ComposeViewController: UICollectionViewDelegate {
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
self.collectionView.collectionViewLayout.invalidateLayout()
// make click sound
UIDevice.current.playInputClick()
}
}
} else {

View File

@ -84,3 +84,9 @@ extension CustomEmojiPickerInputView {
return layout
}
}
extension CustomEmojiPickerInputView: UIInputViewAudioFeedback {
var enableInputClicksWhenVisible: Bool {
return true
}
}