Rename ShowEmailWarningForStore(storeId) => IsEmailConfigured(storeId)

This commit is contained in:
nicolas.dorier
2019-04-28 15:28:22 +09:00
parent fcb1de8a86
commit c5adc0eb71
3 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ namespace BTCPayServer.Controllers
var settings = app.GetSettings<CrowdfundSettings>();
var vm = new UpdateCrowdfundViewModel()
{
NotificationEmailWarning = await ShowEmailWarningForStore(app.StoreDataId),
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
Title = settings.Title,
Enabled = settings.Enabled,
EnforceTargetAmount = settings.EnforceTargetAmount,

View File

@@ -94,7 +94,7 @@ namespace BTCPayServer.Controllers
var vm = new UpdatePointOfSaleViewModel()
{
NotificationEmailWarning = await ShowEmailWarningForStore(app.StoreDataId),
NotificationEmailWarning = !await IsEmailConfigured(app.StoreDataId),
Id = appId,
Title = settings.Title,
EnableShoppingCart = settings.EnableShoppingCart,

View File

@@ -181,9 +181,9 @@ namespace BTCPayServer.Controllers
return _UserManager.GetUserId(User);
}
private async Task<bool> ShowEmailWarningForStore(string storeId)
private async Task<bool> IsEmailConfigured(string storeId)
{
return !((await (_emailSenderFactory.GetEmailSender(storeId) as EmailSender)?.GetEmailSettings())?.IsComplete() is true);
return (await (_emailSenderFactory.GetEmailSender(storeId) as EmailSender)?.GetEmailSettings())?.IsComplete() is true;
}
}
}