haptic feedback

This commit is contained in:
2022-03-16 16:45:10 +08:00
parent d3af69b31e
commit cac4735bc4
11 changed files with 53 additions and 28 deletions

View File

@ -5,7 +5,9 @@ using Billing.Languages;
using Billing.Models;
using Billing.Store;
using Billing.UI;
using Xamarin.Essentials;
using Xamarin.Forms;
using Resource = Billing.Languages.Resource;
namespace Billing.Views
{
@ -171,6 +173,16 @@ namespace Billing.Views
category.LastUsed = DateTime.Now;
await StoreHelper.SaveCategoryItemAsync(category);
try
{
HapticFeedback.Perform();
}
catch (FeatureNotSupportedException) { }
catch (Exception ex)
{
Helper.Error("haptic.feedback", ex);
}
}
}