Пример #1
0
        private void onFetchSucceeded()
        {
            var ratingViewConfiguration        = fetchRemoteConfigService.ExtractRatingViewConfigurationFromRemoteConfig();
            var pushNotificationsConfiguration = fetchRemoteConfigService.ExtractPushNotificationsConfigurationFromRemoteConfig();

            keyValueStorage.SetInt(RatingViewDelayParameter, ratingViewConfiguration.DayCount);
            keyValueStorage.SetString(RatingViewTriggerParameter, ratingViewConfiguration.Criterion.ToString());
            keyValueStorage.SetBool(RegisterPushNotificationsTokenWithServerParameter, pushNotificationsConfiguration.RegisterPushNotificationsTokenWithServer);
            keyValueStorage.SetBool(HandlePushNotificationsParameter, pushNotificationsConfiguration.HandlePushNotifications);

            lock (updateLock)
            {
                keyValueStorage.SetDateTimeOffset(LastFetchAtKey, timeService.CurrentDateTime);
                remoteConfigUpdatedSubject.OnNext(Unit.Default);
                isRunning = false;
            }
        }
Пример #2
0
 public void SetDidShowRatingView()
 {
     keyValueStorage.SetInt(ratingViewNumberOfTimesShownKey, NumberOfTimesRatingViewWasShown() + 1);
 }
Пример #3
0
 public void SetRatingViewOutcome(RatingViewOutcome outcome, DateTimeOffset dateTime)
 {
     keyValueStorage.SetInt(ratingViewOutcomeKey, (int)outcome);
     keyValueStorage.SetDateTimeOffset(ratingViewOutcomeTimeKey, dateTime);
 }