From 95822aeac2771cc2ddeabb072c418d550f98f4e7 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 15 Mar 2018 18:02:35 +0100 Subject: [PATCH 1/2] feat(badge) add isSupported function --- src/@ionic-native/plugins/badge/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/@ionic-native/plugins/badge/index.ts b/src/@ionic-native/plugins/badge/index.ts index 7da09cf74..d7398cb3d 100644 --- a/src/@ionic-native/plugins/badge/index.ts +++ b/src/@ionic-native/plugins/badge/index.ts @@ -69,6 +69,13 @@ export class Badge extends IonicNativePlugin { */ @Cordova() decrease(decreaseBy: number): Promise { return; } + + /** + * Check support to show badges. + * @returns {Promise} + */ + @Cordova() + isSupported(): Promise { return; } /** * Determine if the app has permission to show badges. From bebc5c2a5060648baee859fde61f78b2e313267d Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 15 Mar 2018 18:06:25 +0100 Subject: [PATCH 2/2] fix lint --- src/@ionic-native/plugins/badge/index.ts | 37 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/@ionic-native/plugins/badge/index.ts b/src/@ionic-native/plugins/badge/index.ts index d7398cb3d..eb4828fe5 100644 --- a/src/@ionic-native/plugins/badge/index.ts +++ b/src/@ionic-native/plugins/badge/index.ts @@ -1,7 +1,6 @@ import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; - /** * @name Badge * @description @@ -31,13 +30,14 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; }) @Injectable() export class Badge extends IonicNativePlugin { - /** * Clear the badge of the app icon. * @returns {Promise} */ @Cordova() - clear(): Promise { return; } + clear(): Promise { + return; + } /** * Set the badge of the app icon. @@ -45,14 +45,18 @@ export class Badge extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - set(badgeNumber: number): Promise { return; } + set(badgeNumber: number): Promise { + return; + } /** * Get the badge of the app icon. * @returns {Promise} */ @Cordova() - get(): Promise { return; } + get(): Promise { + return; + } /** * Increase the badge number. @@ -60,7 +64,9 @@ export class Badge extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - increase(increaseBy: number): Promise { return; } + increase(increaseBy: number): Promise { + return; + } /** * Decrease the badge number. @@ -68,27 +74,34 @@ export class Badge extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - decrease(decreaseBy: number): Promise { return; } - + decrease(decreaseBy: number): Promise { + return; + } + /** * Check support to show badges. * @returns {Promise} */ @Cordova() - isSupported(): Promise { return; } + isSupported(): Promise { + return; + } /** * Determine if the app has permission to show badges. * @returns {Promise} */ @Cordova() - hasPermission(): Promise { return; } + hasPermission(): Promise { + return; + } /** * Register permission to set badge notifications * @returns {Promise} */ @Cordova() - registerPermission(): Promise { return; } - + registerPermission(): Promise { + return; + } }