Skip to content

Commit

Permalink
release(app): v4.1.0+40100 (#1052)
Browse files Browse the repository at this point in the history
* release(app): v4.1.0+40100

* fix: support old and new data format
  • Loading branch information
Nirajn2311 authored Jul 18, 2023
1 parent f690f85 commit af1605a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions mobile-app/lib/models/learn/curriculum_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,21 @@ class Block {
challenges: (data['challengeOrder'] as List)
.map<ChallengeOrder>(
(dynamic challenge) => ChallengeOrder(
id: challenge['id'],
title: challenge['title'],
id: challenge[0] ?? challenge['id'],
title: challenge[1] ?? challenge['title'],
),
)
.toList(),
challengeTiles: (data['challengeOrder'] as List)
.map<ChallengeListTile>(
(dynamic challenge) => ChallengeListTile(
id: challenge['id'],
name: challenge['title'],
dashedName: challenge['title']
.toLowerCase()
.replaceAll(' ', '-')
.replaceAll(RegExp(r"[@':]"), ''),
id: challenge[0] ?? challenge['id'],
name: challenge[1] ?? challenge['title'],
dashedName: challenge[1] ??
challenge['title']
.toLowerCase()
.replaceAll(' ', '-')
.replaceAll(RegExp(r"[@':]"), ''),
),
)
.toList(),
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: freecodecamp
description: freecodecamp.org app.
publish_to: none
version: 4.0.1+40001
version: 4.1.0+40100
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
Expand Down

0 comments on commit af1605a

Please sign in to comment.