Skip to content

Commit

Permalink
Merge pull request #612 from hpi-studyu/dev
Browse files Browse the repository at this point in the history
fix: Hotfix for app signup
  • Loading branch information
johannesvedder authored Apr 29, 2024
2 parents 4dccd78 + 06801bf commit 492807a
Show file tree
Hide file tree
Showing 16 changed files with 563 additions and 376 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,61 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-04-26

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`studyu_app` - `v2.7.3`](#studyu_app---v273)

---

#### `studyu_app` - `v2.7.3`

- **FIX**: skip handling multimodal for web. ([27ba5298](https://github.com/hpi-studyu/studyu/commit/27ba5298a1b714e1cc7e21a6d88c286f91e2907a))


## 2024-04-25

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`studyu_designer_v2` - `v1.7.2`](#studyu_designer_v2---v172)
- [`studyu_flutter_common` - `v1.8.2`](#studyu_flutter_common---v182)
- [`studyu_app` - `v2.7.2`](#studyu_app---v272)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

- `studyu_app` - `v2.7.2`

---

#### `studyu_designer_v2` - `v1.7.2`

- **FIX**: signup was not possible with flutter_secure_storage. ([26425971](https://github.com/hpi-studyu/studyu/commit/2642597141653aa724a1305456e43840d6fbebe5))

#### `studyu_flutter_common` - `v1.8.2`

- **FIX**: skip signin after signup if user is already authenticated. ([7e978122](https://github.com/hpi-studyu/studyu/commit/7e97812279b77fb9406fb288341c0fd9e349ad9c))
- **FIX**: signup was not possible with flutter_secure_storage. ([26425971](https://github.com/hpi-studyu/studyu/commit/2642597141653aa724a1305456e43840d6fbebe5))


## 2024-04-23

### Changes
Expand Down
8 changes: 8 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.7.3

- **FIX**: skip handling multimodal for web. ([27ba5298](https://github.com/hpi-studyu/studyu/commit/27ba5298a1b714e1cc7e21a6d88c286f91e2907a))

## 2.7.2

- Update a dependency to the latest release.

## 2.7.1

- **FIX**: add NSCameraUsageDescription. ([bfdd5a9e](https://github.com/hpi-studyu/studyu/commit/bfdd5a9ea795b83152d8ccdd02dec8e0d30b2e7f))
Expand Down
37 changes: 20 additions & 17 deletions app/lib/util/study_subject_extension.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:studyu_app/util/temporary_storage_handler.dart';
import 'package:studyu_core/core.dart';

Expand All @@ -20,26 +21,28 @@ extension StudySubjectExtension on StudySubject {
print('Unsupported question type: $T');
}

// Move multimodal files to upload directory
if (resultObject.result is QuestionnaireState) {
final questionnaireState = resultObject.result as QuestionnaireState;
for (final answerEntry in questionnaireState.answers.entries.toList()) {
final answer = answerEntry.value;
if (answer.response is FutureBlobFile) {
final futureBlobFile = answer.response as FutureBlobFile;
await TemporaryStorageHandler.moveStagingFileToUploadDirectory(
futureBlobFile.localFilePath, futureBlobFile.futureBlobId);
// Skip multimodal file handling for web
if (!kIsWeb) {
// Move multimodal files to upload directory
if (resultObject.result is QuestionnaireState) {
final questionnaireState = resultObject.result as QuestionnaireState;
for (final answerEntry in questionnaireState.answers.entries.toList()) {
final answer = answerEntry.value;
if (answer.response is FutureBlobFile) {
final futureBlobFile = answer.response as FutureBlobFile;
await TemporaryStorageHandler.moveStagingFileToUploadDirectory(
futureBlobFile.localFilePath, futureBlobFile.futureBlobId);

// Replaces Answer<FutureBlobFile> with Answer<String>
questionnaireState.answers[answerEntry.key] = Answer<String>(answer.question, answer.timestamp)
..response = futureBlobFile.futureBlobId;
// Replaces Answer<FutureBlobFile> with Answer<String>
questionnaireState.answers[answerEntry.key] = Answer<String>(answer.question, answer.timestamp)
..response = futureBlobFile.futureBlobId;
}
}
}
}

// Upload multimodal files
if (!offline) {
await Cache.uploadBlobFiles();
// Upload multimodal files
if (!offline) {
await Cache.uploadBlobFiles();
}
}

SubjectProgress p = SubjectProgress(
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ packages:
path: "../flutter_common"
relative: true
source: path
version: "1.8.1"
version: "1.8.2"
supabase:
dependency: "direct main"
description:
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: studyu_app
version: 2.7.1
version: 2.7.3
description: Partake in digital N-of-1 trials with the innovative StudyU Health App
publish_to: none
homepage: https://studyu.health
Expand Down Expand Up @@ -39,7 +39,7 @@ dependencies:
sentry_logging: ^7.20.0
shared_preferences: ^2.2.3
studyu_core: ^4.4.1
studyu_flutter_common: ^1.8.1
studyu_flutter_common: ^1.8.2
supabase: ^2.1.1
supabase_flutter: ^2.5.1
timeline_tile: ^2.0.0
Expand Down
4 changes: 4 additions & 0 deletions designer_v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.7.2

- **FIX**: signup was not possible with flutter_secure_storage. ([26425971](https://github.com/hpi-studyu/studyu/commit/2642597141653aa724a1305456e43840d6fbebe5))

## 1.7.1

- Update a dependency to the latest release.
Expand Down
10 changes: 9 additions & 1 deletion designer_v2/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ packages:
path: "../flutter_common"
relative: true
source: path
version: "1.8.1"
version: "1.8.2"
supabase:
dependency: "direct main"
description:
Expand All @@ -1079,6 +1079,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.3.1"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
term_glyph:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions designer_v2/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: studyu_designer_v2
version: 1.7.1
version: 1.7.2
description: Implement digital N-of-1 studies seamlessly with the StudyU Health Designer
publish_to: none
homepage: https://studyu.health
Expand Down Expand Up @@ -33,7 +33,7 @@ dependencies:
reactive_range_slider: ^2.0.0 # reactive_forms <= 16.1.1
rxdart: ^0.27.7
studyu_core: ^4.4.1
studyu_flutter_common: ^1.8.1
studyu_flutter_common: ^1.8.2
supabase: ^2.1.1
supabase_flutter: ^2.5.1
url_launcher: ^6.2.6
Expand Down
Loading

0 comments on commit 492807a

Please sign in to comment.