Skip to content

Commit 49c2867

Browse files
committed
redis-phase2-success
1 parent 5854f9a commit 49c2867

File tree

13 files changed

+226
-153
lines changed

13 files changed

+226
-153
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ jobs:
6060
uses: ncipollo/release-action@v1
6161
with:
6262
artifacts: "build/app/outputs/apk/release/*"
63-
tag: v2.0.9.4
63+
tag: v2.1.0
6464
token: ${{ secrets.TOKEN }}
65-
name: "beta-v2.0.9.4"
65+
name: "beta-v2.1.0"
6666
body: |
67-
## What's New in v2.0.9.4
67+
## What's New in v2.1.0
6868
69-
- Base Bug Fixes for Beta.
69+
- **Redis connection fixes and data privacy improvised**
7070
- **Redis Cloud Implementation and Fetching in Beta Phase**
7171
- **Structure of Redis added to Clean Architecture
7272
- **Added Redis-base to support syncfusion**
7373
- **Fixed Performance and Responsiveness Issues by Improvised BLoC Structure.
7474
- **New Feature**: Implemented Syncfusion and Redis for low latency.
7575
76-
### Known Issues are Resolved - Looking for vulnerabilities before Redis Full-Integration.
76+
### Known Issues are Resolved - Redis Full-Integration Phase 2

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<a href="https://github.com/ARYPROGRAMMER/Mindful-App/actions">
55
<img src="https://github.com/travisjeffery/timecop/workflows/CI/badge.svg" alt="Build Status"/>
66
</a>
7-
<img src="https://img.shields.io/badge/version-2.0.9.4-green" alt="Version"/>
7+
<img src="https://img.shields.io/badge/version-2.1.0-green" alt="Version"/>
88
</p>
99

1010
<p align="center">
@@ -17,16 +17,16 @@
1717

1818
**APP STATUS** : ALL CORE FUNCTIONALITIES WORKING (Deployed NodeJs & Postgresql on Render)
1919

20-
## What's New in v2.0.9.4 (Beta Trial Phase for Redis) (Use Stable Version for Best Experience)
20+
## What's New in v2.1.0 (Beta Phase for Redis) (Use Stable Version for Best Experience)
2121

22-
- Base Bug Fixes for Beta.
22+
- **Redis connection fixes and data privacy improvised**
2323
- **Redis Cloud Implementation and Fetching in Beta Phase**
2424
- **Structure of Redis added to Clean Architecture
2525
- **Added Redis-base to support syncfusion**
2626
- **Fixed Performance and Responsiveness Issues by Improvised BLoC Structure.
2727
- **New Feature**: Implemented Syncfusion and Redis for low latency.
2828
29-
### Known Issues are Resolved - Looking for vulnerabilities before Redis Full-Integration.
29+
### Known Issues are Resolved - Redis Full-Integration Phase 2.
3030

3131
[DEMO LINK OF WORKING](https://vimeo.com/1016496824?share=copy)
3232

lib/features/auth/presentation/auth/pages/signup.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Signup extends StatelessWidget {
8989
final mm = Hive.box('lastlogin');
9090
final first = Hive.box('firstime');
9191
mm.put("google", "false");
92-
first.put('firsttime','true');
92+
first.put('firsttime', 'true');
9393
Navigator.pushAndRemoveUntil(
9494
context,
9595
MaterialPageRoute(

lib/features/meditation/data/model/mood_data_model.dart

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,20 @@ class MoodDataModel extends MoodData {
1111
required String relax,
1212
required String focus,
1313
}) : super(
14-
happy: happy,
15-
neutral: neutral,
16-
sad: sad,
17-
calm: calm,
18-
relax: relax,
19-
focus: focus
20-
);
14+
happy: happy,
15+
neutral: neutral,
16+
sad: sad,
17+
calm: calm,
18+
relax: relax,
19+
focus: focus);
2120

2221
factory MoodDataModel.fromJson(Map<String, dynamic> json) {
2322
return MoodDataModel(
24-
happy: json['happy'].toString(),
25-
sad: json['sad'].toString(),
26-
neutral: json['neutral'].toString(),
27-
calm: json['calm'].toString(),
28-
relax: json['relax'].toString(),
29-
focus: json['focus'].toString()
30-
);
23+
happy: json['happy'].toString(),
24+
sad: json['sad'].toString(),
25+
neutral: json['neutral'].toString(),
26+
calm: json['calm'].toString(),
27+
relax: json['relax'].toString(),
28+
focus: json['focus'].toString());
3129
}
3230
}

lib/features/meditation/data/repositories/meditaion_repo_impl.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class MeditationRepoImpl implements MeditationRepository {
1818
Future<MoodMessage> getMoodMessage(String mood) async {
1919
return await remoteDataSource.getMoodMessage(mood);
2020
}
21+
2122
@override
2223
Future<MoodData> getmoodData(String username) async {
2324
return await remoteDataSource.getmoodData(username);

lib/features/meditation/data/sources/meditation_remote_source.dart

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
1616

1717
@override
1818
Future<DailyQuoteModel> getDailyQuote() async {
19-
final response = await client
20-
.get(Uri.parse(
21-
'https://mindful-app-47s6.onrender.com/meditation/dailyQuotes'));
19+
final response = await client.get(Uri.parse(
20+
'https://mindful-app-47s6.onrender.com/meditation/dailyQuotes'));
2221

2322
if (response.statusCode == 200) {
2423
final jsonResponse = json.decode(response.body);
@@ -31,9 +30,8 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
3130

3231
@override
3332
Future<MoodMessageModel> getMoodMessage(String mood) async {
34-
final response = await client
35-
.get(Uri.parse(
36-
'https://mindful-app-47s6.onrender.com/meditation/myMood/$mood'));
33+
final response = await client.get(Uri.parse(
34+
'https://mindful-app-47s6.onrender.com/meditation/myMood/$mood'));
3735
if (response.statusCode == 200) {
3836
final jsonResponse = json.decode(response.body);
3937

@@ -44,19 +42,15 @@ class MeditationRemoteDataSourceImpl implements MeditaionRemoteDataSource {
4442
}
4543

4644
@override
47-
Future<MoodDataModel> getmoodData(String username)async{
48-
final response = await client.get(Uri.parse(
49-
'https://mindful-app-47s6.onrender.com/user/$username'
50-
));
45+
Future<MoodDataModel> getmoodData(String username) async {
46+
final response = await client
47+
.get(Uri.parse('https://mindful-app-47s6.onrender.com/user/$username'));
5148

52-
if (response.statusCode==200){
49+
if (response.statusCode == 200) {
5350
final jsonResponse = json.decode(response.body);
5451
return MoodDataModel.fromJson(jsonResponse);
55-
56-
}
57-
else {
52+
} else {
5853
throw Exception("Failed to get data");
59-
6054
}
6155
}
6256
}

lib/features/meditation/domain/entities/mood_data.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ class MoodData {
66
final String relax;
77
final String focus;
88

9-
MoodData({required this.happy, required this.neutral, required this.sad, required this.calm, required this.relax, required this.focus});
10-
11-
9+
MoodData(
10+
{required this.happy,
11+
required this.neutral,
12+
required this.sad,
13+
required this.calm,
14+
required this.relax,
15+
required this.focus});
1216
}

lib/features/meditation/presentation/bloc/mood_data/mood_data_bloc.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import 'package:mental_health/features/meditation/presentation/bloc/mood_data/mo
66
class MoodDataBloc extends Bloc<MoodDataEvent, MoodDataState> {
77
final GetMoodData getmoodData;
88

9-
MoodDataBloc({required this.getmoodData})
10-
: super(MoodDataInitial()) {
9+
MoodDataBloc({required this.getmoodData}) : super(MoodDataInitial()) {
1110
on<FetchMoodData>((event, emit) async {
1211
emit(MoodDataLoading());
1312
try {
@@ -17,6 +16,5 @@ class MoodDataBloc extends Bloc<MoodDataEvent, MoodDataState> {
1716
emit(MoodDataError(message: e.toString()));
1817
}
1918
});
20-
2119
}
2220
}

lib/features/meditation/presentation/bloc/mood_data/mood_data_event.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ class FetchMoodData extends MoodDataEvent {
55

66
FetchMoodData(this.username);
77
}
8-

0 commit comments

Comments
 (0)