mirror of
https://github.com/bitwarden/android.git
synced 2026-05-22 04:22:11 -05:00
* PS-1009 Added effect to Entry that doesn't allow keyboard with emojis on passphrase separator * PS-1009 Removed unnecessary ImeOptions setting from NoEmojiKeyboardEffect Improved code * PS-1009 Removed unnecessary null validation on Android's NoEmojiKeyboardEffect Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
26 lines
603 B
C#
26 lines
603 B
C#
using System;
|
|
using Bit.iOS.Core.Effects;
|
|
using UIKit;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.iOS;
|
|
|
|
[assembly: ExportEffect(typeof(NoEmojiKeyboardEffect), nameof(NoEmojiKeyboardEffect))]
|
|
namespace Bit.iOS.Core.Effects
|
|
{
|
|
public class NoEmojiKeyboardEffect : PlatformEffect
|
|
{
|
|
protected override void OnAttached()
|
|
{
|
|
if (Element != null && Control is UITextField textField)
|
|
{
|
|
textField.KeyboardType = UIKeyboardType.ASCIICapable;
|
|
}
|
|
}
|
|
|
|
protected override void OnDetached()
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|