Skip to content

Commit 8fc3465

Browse files
authored
refactor(three-dee-touch): Replace onHomeIconPressed with registerQuickActionListener (#4829)
* refactor(three-dee-touch): Replace onHomeIconPressed with registerQuickActionListener * fix: install option * remove install
1 parent 50287d1 commit 8fc3465

File tree

1 file changed

+9
-7
lines changed
  • src/@awesome-cordova-plugins/plugins/three-dee-touch

1 file changed

+9
-7
lines changed

src/@awesome-cordova-plugins/plugins/three-dee-touch/index.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Injectable } from '@angular/core';
2-
import { Cordova, CordovaFunctionOverride, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
2+
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
33
import { Observable } from 'rxjs';
44

55
export interface ThreeDeeTouchQuickAction {
66
/**
7-
* Type that can be used in the onHomeIconPressed callback
7+
* Type that can be used in the registerQuickActionListener callback
88
*/
99
type?: string;
1010

@@ -105,7 +105,7 @@ export interface ThreeDeeTouchForceTouch {
105105
*
106106
* this.threeDeeTouch.configureQuickActions(actions);
107107
*
108-
* this.threeDeeTouch.onHomeIconPressed().subscribe(
108+
* this.threeDeeTouch.registerQuickActionListener().subscribe(
109109
* (payload) => {
110110
* // returns an object that is the button you presed
111111
* console.log('Pressed the ${payload.title} button')
@@ -120,9 +120,9 @@ export interface ThreeDeeTouchForceTouch {
120120
*/
121121
@Plugin({
122122
pluginName: 'ThreeDeeTouch',
123-
plugin: 'cordova-plugin-3dtouch',
123+
plugin: '@herdwatch/cordova-plugin-3dtouch',
124124
pluginRef: 'ThreeDeeTouch',
125-
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-3dtouch',
125+
repo: 'https://github.com/herdwatch-apps/cordova-plugin-3dtouch',
126126
platforms: ['iOS'],
127127
})
128128
@Injectable()
@@ -169,8 +169,10 @@ export class ThreeDeeTouch extends AwesomeCordovaNativePlugin {
169169
*
170170
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
171171
*/
172-
@CordovaFunctionOverride()
173-
onHomeIconPressed(): Observable<any> {
172+
@Cordova({
173+
observable: true,
174+
})
175+
registerQuickActionListener(): Observable<ThreeDeeTouchQuickAction> {
174176
return;
175177
}
176178

0 commit comments

Comments
 (0)