Skip to content

Commit

Permalink
Revert "Added InAppReview after 100 checks"
Browse files Browse the repository at this point in the history
This reverts commit b6ddf48.
  • Loading branch information
xpavle00 committed Jan 18, 2024
1 parent 52e579e commit 2f371c3
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 67 deletions.
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- in_app_review (0.2.0):
- Flutter
- IosAwnCore (0.8.0)
- just_audio (0.0.1):
- Flutter
Expand All @@ -42,7 +40,6 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_file_dialog (from `.symlinks/plugins/flutter_file_dialog/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- just_audio (from `.symlinks/plugins/just_audio/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
Expand All @@ -69,8 +66,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_file_dialog/ios"
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
in_app_review:
:path: ".symlinks/plugins/in_app_review/ios"
just_audio:
:path: ".symlinks/plugins/just_audio/ios"
package_info_plus:
Expand All @@ -94,7 +89,6 @@ SPEC CHECKSUMS:
flutter_file_dialog: 4c014a45b105709a27391e266c277d7e588e9299
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d
IosAwnCore: ed1b2b6d84962a758354dbacd9ce525c72ce28a9
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
Expand Down
2 changes: 0 additions & 2 deletions lib/habits/one_day_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ class OneDayButton extends StatelessWidget {
parent.showRewardNotification(date);
Provider.of<SettingsManager>(context, listen: false)
.playCheckSound();
Provider.of<SettingsManager>(context, listen: false)
.checkInAppReview();
} else {
Provider.of<SettingsManager>(context, listen: false)
.playClickSound();
Expand Down
9 changes: 1 addition & 8 deletions lib/model/settings_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class SettingsData {
Color checkColor = HaboColors.primary;
Color failColor = HaboColors.red;
Color skipColor = HaboColors.skip;
int checks = 0;
int reviewTresHold = 100;

SettingsData();

Expand All @@ -41,10 +39,7 @@ class SettingsData {
: HaboColors.red,
skipColor = (json['skipColor'] != null)
? Color(json['skipColor'])
: HaboColors.skip,
checks = (json['checks'] != null) ? json['checks'] : 0,
reviewTresHold =
(json['reviewTresHold'] != null) ? json['reviewTresHold'] : 100;
: HaboColors.skip;

Map<String, dynamic> toJson() => {
'theme': theme.index,
Expand All @@ -58,7 +53,5 @@ class SettingsData {
'checkColor': checkColor.value,
'failColor': failColor.value,
'skipColor': skipColor.value,
'checks': checks,
'reviewTresHold': reviewTresHold,
};
}
19 changes: 0 additions & 19 deletions lib/settings/settings_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:habo/themes.dart';
import 'package:just_audio/just_audio.dart';
import 'package:table_calendar/table_calendar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:in_app_review/in_app_review.dart';

class SettingsManager extends ChangeNotifier {
final Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
Expand All @@ -18,8 +17,6 @@ class SettingsManager extends ChangeNotifier {
final _checkPlayer = AudioPlayer(handleAudioSessionActivation: false);
final _clickPlayer = AudioPlayer(handleAudioSessionActivation: false);

final InAppReview inAppReview = InAppReview.instance;

void initialize() async {
await loadData();
_isInitialized = true;
Expand Down Expand Up @@ -57,22 +54,6 @@ class SettingsManager extends ChangeNotifier {
}
}

void checkInAppReview() async {
_settingsData.checks++;

if (_settingsData.checks >= _settingsData.reviewTresHold) {
showInAppReview();
_settingsData.reviewTresHold *= 2;
}
saveData();
}

void showInAppReview() async {
if (await inAppReview.isAvailable()) {
inAppReview.requestReview();
}
}

void saveData() async {
final SharedPreferences prefs = await _prefs;
prefs.setString('habo_settings', jsonEncode(_settingsData));
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Foundation

import audio_session
import awesome_notifications
import in_app_review
import just_audio
import package_info_plus
import path_provider_foundation
Expand All @@ -20,7 +19,6 @@ import window_size
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
AwesomeNotificationsPlugin.register(with: registry.registrar(forPlugin: "AwesomeNotificationsPlugin"))
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
Expand Down
16 changes: 5 additions & 11 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- in_app_review (0.2.0):
- FlutterMacOS
- just_audio (0.0.1):
- FlutterMacOS
- package_info_plus (0.0.1):
Expand All @@ -33,7 +31,6 @@ DEPENDENCIES:
- audio_session (from `Flutter/ephemeral/.symlinks/plugins/audio_session/macos`)
- awesome_notifications (from `Flutter/ephemeral/.symlinks/plugins/awesome_notifications/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- in_app_review (from `Flutter/ephemeral/.symlinks/plugins/in_app_review/macos`)
- just_audio (from `Flutter/ephemeral/.symlinks/plugins/just_audio/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
Expand All @@ -54,8 +51,6 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/awesome_notifications/macos
FlutterMacOS:
:path: Flutter/ephemeral
in_app_review:
:path: Flutter/ephemeral/.symlinks/plugins/in_app_review/macos
just_audio:
:path: Flutter/ephemeral/.symlinks/plugins/just_audio/macos
package_info_plus:
Expand All @@ -78,16 +73,15 @@ SPEC CHECKSUMS:
awesome_notifications: 428f5c15a700b117418aed09e29c21c5806fcf69
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0
just_audio: 9b67ca7b97c61cfc9784ea23cd8cc55eb226d489
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
rive_common: acedcab7802c0ece4b0d838b71d7deb637e1309a
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
rive_common: fab8476ce8352bf54152a913f393a8696d3dc98c
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

COCOAPODS: 1.14.2
COCOAPODS: 1.12.1
2 changes: 1 addition & 1 deletion macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
16 changes: 0 additions & 16 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.3"
in_app_review:
dependency: "direct main"
description:
name: in_app_review
sha256: "41ec6f30427ab09eb6ae1c85c4a2a624a145fc5d726f023de4d97170ec9e5466"
url: "https://pub.dev"
source: hosted
version: "2.0.8"
in_app_review_platform_interface:
dependency: transitive
description:
name: in_app_review_platform_interface
sha256: fed2c755f2125caa9ae10495a3c163aa7fab5af3585a9c62ef4a6920c5b45f10
url: "https://pub.dev"
source: hosted
version: "2.0.5"
intl:
dependency: "direct main"
description:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dependencies:
sdk: flutter
intl: any
intl_utils: ^2.8.5
in_app_review: ^2.0.8

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 2f371c3

Please sign in to comment.