Skip to content

Commit

Permalink
Merge pull request #1576 from RADAR-base/release-2.6.3-alpha
Browse files Browse the repository at this point in the history
Release 2.6.3-alpha
  • Loading branch information
mpgxvii authored Nov 4, 2022
2 parents 41ff0e3 + 9a06a9a commit f8fe0f4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 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="radar-base@kcl.ac.uk" href="http://radar-base.org/">RADAR-Base</author>
Expand Down
1 change: 0 additions & 1 deletion src/app/core/services/schedule/schedule-factory.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class ScheduleFactoryService extends ScheduleService {
logger: LogService
) {
super(store, logger)
this.init()
}

init() {
Expand Down
9 changes: 5 additions & 4 deletions src/app/pages/home/containers/home-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export class HomePageComponent implements OnDestroy {
title: Promise<string>
sortedTasks: Promise<Map<any, any>>
tasks: Promise<Task[]>
currentDate: Date
nextTask: Task
timeToNextTask: number
tasksProgress: Promise<TasksProgress>
resumeListener: Subscription = new Subscription()
changeDetectionListener: Subscription = new Subscription()
lastTaskRefreshTime = Date.now()

showCalendar = false
showCompleted = false
Expand All @@ -46,6 +46,8 @@ export class HomePageComponent implements OnDestroy {

APP_CREDITS = '&#169; RADAR-Base'
HTML_BREAK = '<br>'
// How long to wait before refreshing tasks
TASK_REFRESH_MILLIS = 600_000

constructor(
public navCtrl: NavController,
Expand Down Expand Up @@ -97,7 +99,6 @@ export class HomePageComponent implements OnDestroy {
init() {
this.sortedTasks = this.tasksService.getValidTasksMap()
this.tasks = this.tasksService.getTasksOfToday()
this.currentDate = this.tasksService.getCurrentDateMidnight()
this.tasksProgress = this.tasksService.getTaskProgress()
this.tasks.then(tasks => {
this.checkTaskInterval = setInterval(() => {
Expand All @@ -119,8 +120,8 @@ export class HomePageComponent implements OnDestroy {
}

checkForNewDate() {
if (new Date().getDate() !== this.currentDate.getDate()) {
this.currentDate = this.tasksService.getCurrentDateMidnight()
if (Date.now() - this.lastTaskRefreshTime > this.TASK_REFRESH_MILLIS) {
this.lastTaskRefreshTime = Date.now()
this.navCtrl.setRoot(SplashPageComponent)
}
}
Expand Down
1 change: 1 addition & 0 deletions src/app/pages/splash/services/splash.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class SplashService {
.refresh()
.then(() => this.notificationService.init())
.then(() => this.notificationService.permissionCheck())
.then(() => this.schedule.init())
.then(() => this.config.fetchConfigState())
}

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 f8fe0f4

Please sign in to comment.