fdroiddata/metadata/com.standardnotes/remove-gms.patch
2022-07-03 09:44:40 +00:00

26 lines
948 B
Diff

diff --git a/packages/mobile/src/Lib/ReviewService.ts b/packages/mobile/src/Lib/ReviewService.ts
index 30561c72..e155397f 100644
--- a/packages/mobile/src/Lib/ReviewService.ts
+++ b/packages/mobile/src/Lib/ReviewService.ts
@@ -1,21 +1,8 @@
import { ApplicationService, Platform } from '@standardnotes/snjs'
-import * as StoreReview from 'react-native-store-review'
const RUN_COUNTS_BEFORE_REVIEW = [18, 45, 105]
export class ReviewService extends ApplicationService {
- override async onAppLaunch() {
- if (this.application?.platform === Platform.Android || !StoreReview.isAvailable) {
- return
- }
- const runCount = await this.getRunCount()
- void this.setRunCount(runCount + 1)
- if (RUN_COUNTS_BEFORE_REVIEW.includes(runCount)) {
- setTimeout(function () {
- StoreReview.requestReview()
- }, 1000)
- }
- }
async getRunCount() {
return Number(this.application?.getValue('runCount'))
}