Skip to content

Commit

Permalink
Merge pull request #1591 from RADAR-base/fix/remote-config-minimum-fe…
Browse files Browse the repository at this point in the history
…tch-interval

Fix/remote config minimum fetch interval
  • Loading branch information
mpgxvii authored Nov 25, 2022
2 parents 5479e6a + c9d7fea commit 4f08628
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="572" id="org.phidatalab.radar_armt" ios-CFBundleIdentifier="org.phidatalab.radar-armt" ios-CFBundleVersion="1" version="2.6.2-alpha" xmlns:android="http://schemas.android.com/apk/res/android">
<widget android-versionCode="573" id="org.phidatalab.radar_armt" ios-CFBundleIdentifier="org.phidatalab.radar-armt" ios-CFBundleVersion="1" version="2.6.3-alpha" xmlns:android="http://schemas.android.com/apk/res/android">
<name>RADAR Questionnaire</name>
<description>An application that collects active data for research.</description>
<author email="[email protected]" href="http://radar-base.org/">RADAR-Base</author>
Expand Down
3 changes: 2 additions & 1 deletion src/app/core/services/config/remote-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class FirebaseRemoteConfig implements RemoteConfig {
export class FirebaseRemoteConfigService extends RemoteConfigService {
private readonly configSubject: BehaviorSubject<RemoteConfig>
private FETCH_TIMEOUT_SECONDS = 20
private MINIMUM_FETCH_INTERVAL_SECONDS = 21600 // 6 hours

constructor(
private firebase: FirebaseX,
Expand All @@ -116,7 +117,7 @@ export class FirebaseRemoteConfigService extends RemoteConfigService {
super(storage)
this.configSubject = new BehaviorSubject(new EmptyRemoteConfig())
this.platform.ready().then(() => {
FirebasePlugin.setConfigSettings(this.FETCH_TIMEOUT_SECONDS, null)
FirebasePlugin.setConfigSettings(this.FETCH_TIMEOUT_SECONDS, this.MINIMUM_FETCH_INTERVAL_SECONDS)
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/assets/data/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Localisations } from './localisations'
export const DefaultPlatformInstance = 'RADAR-CNS'

// *Default app version
export const DefaultAppVersion = '2.6.1-alpha'
export const DefaultAppVersion = '2.6.3-alpha'

// *Default Android package name
export const DefaultPackageName = 'org.phidatalab.radar_armt'
Expand Down

0 comments on commit 4f08628

Please sign in to comment.