From 8fc3465ed5e7d4e9e1d7c6e6561980b471513b7a Mon Sep 17 00:00:00 2001 From: Maxim Belov Date: Sun, 13 Oct 2024 17:44:04 +0300 Subject: [PATCH] refactor(three-dee-touch): Replace onHomeIconPressed with registerQuickActionListener (#4829) * refactor(three-dee-touch): Replace onHomeIconPressed with registerQuickActionListener * fix: install option * remove install --- .../plugins/three-dee-touch/index.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/three-dee-touch/index.ts b/src/@awesome-cordova-plugins/plugins/three-dee-touch/index.ts index a81a5fb72..72c01b261 100644 --- a/src/@awesome-cordova-plugins/plugins/three-dee-touch/index.ts +++ b/src/@awesome-cordova-plugins/plugins/three-dee-touch/index.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; -import { Cordova, CordovaFunctionOverride, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core'; +import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core'; import { Observable } from 'rxjs'; export interface ThreeDeeTouchQuickAction { /** - * Type that can be used in the onHomeIconPressed callback + * Type that can be used in the registerQuickActionListener callback */ type?: string; @@ -105,7 +105,7 @@ export interface ThreeDeeTouchForceTouch { * * this.threeDeeTouch.configureQuickActions(actions); * - * this.threeDeeTouch.onHomeIconPressed().subscribe( + * this.threeDeeTouch.registerQuickActionListener().subscribe( * (payload) => { * // returns an object that is the button you presed * console.log('Pressed the ${payload.title} button') @@ -120,9 +120,9 @@ export interface ThreeDeeTouchForceTouch { */ @Plugin({ pluginName: 'ThreeDeeTouch', - plugin: 'cordova-plugin-3dtouch', + plugin: '@herdwatch/cordova-plugin-3dtouch', pluginRef: 'ThreeDeeTouch', - repo: 'https://github.com/EddyVerbruggen/cordova-plugin-3dtouch', + repo: 'https://github.com/herdwatch-apps/cordova-plugin-3dtouch', platforms: ['iOS'], }) @Injectable() @@ -169,8 +169,10 @@ export class ThreeDeeTouch extends AwesomeCordovaNativePlugin { * * @returns {Observable} returns an observable that notifies you when he user presses on the home screen icon */ - @CordovaFunctionOverride() - onHomeIconPressed(): Observable { + @Cordova({ + observable: true, + }) + registerQuickActionListener(): Observable { return; }