Enable the mobile ntoifications inside Ombi

pull/2225/head
Jamie Rees 7 years ago
parent 5e25e16649
commit f426551222

@ -39,7 +39,7 @@ namespace Ombi.Notifications.Agents
protected override bool ValidateConfiguration(MobileNotificationSettings settings) protected override bool ValidateConfiguration(MobileNotificationSettings settings)
{ {
return false; return true;
} }
protected override async Task NewRequest(NotificationOptions model, MobileNotificationSettings settings) protected override async Task NewRequest(NotificationOptions model, MobileNotificationSettings settings)
@ -211,7 +211,7 @@ namespace Ombi.Notifications.Agents
protected async Task Send(List<string> playerIds, NotificationMessage model, MobileNotificationSettings settings) protected async Task Send(List<string> playerIds, NotificationMessage model, MobileNotificationSettings settings)
{ {
if (!playerIds.Any()) if (playerIds == null || !playerIds.Any())
{ {
return; return;
} }

@ -30,7 +30,14 @@ export class MobileComponent implements OnInit {
}); });
}); });
this.mobileService.getUserDeviceList().subscribe(x => this.userList = x); this.mobileService.getUserDeviceList().subscribe(x => {
if(x.length <= 0) {
this.userList = [];
this.userList.push({username:"None",devices:0});
} else {
this.userList = x;
}
});
} }
public onSubmit(form: FormGroup) { public onSubmit(form: FormGroup) {

@ -54,6 +54,7 @@
<i class="fa fa-bell-o" aria-hidden="true"></i> Notifications <span class="caret"></span> <i class="fa fa-bell-o" aria-hidden="true"></i> Notifications <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Mobile']">Mobile</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Email']">Email</a></li> <li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Email']">Email</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/MassEmail']">Mass Email</a></li> <li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/MassEmail']">Mass Email</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Newsletter']">Newsletter</a></li> <li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Newsletter']">Newsletter</a></li>

Loading…
Cancel
Save