fix(launch-review): Allow rating() callback to be invoked multiple times (#3455)

This commit is contained in:
Calum Murray 2020-06-23 17:58:22 +01:00 committed by GitHub
parent 2923504c7d
commit 40b9295de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/** /**
* @name Launch Review * @name Launch Review
@ -55,10 +56,10 @@ export class LaunchReview extends IonicNativePlugin {
* - First: after `LaunchReview.rating()` is called and the request to show the dialog is successful. Will be passed the value `requested`. * - First: after `LaunchReview.rating()` is called and the request to show the dialog is successful. Will be passed the value `requested`.
* - Second: if and when the Rating dialog is actually displayed. Will be passed the value `shown`. * - Second: if and when the Rating dialog is actually displayed. Will be passed the value `shown`.
* - Third: if and when the Rating dialog is dismissed. Will be passed the value `dismissed`. * - Third: if and when the Rating dialog is dismissed. Will be passed the value `dismissed`.
* @returns {Promise<string>} * @returns {Observable<string>}
*/ */
@Cordova({ platforms: ['iOS'] }) @Cordova({ observable: true })
rating(): Promise<string> { rating(): Observable<string> {
return; return;
} }