Skip to content

Commit 5854f9a

Browse files
committed
redis-bug-fixes:2
1 parent f753d03 commit 5854f9a

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ jobs:
6060
uses: ncipollo/release-action@v1
6161
with:
6262
artifacts: "build/app/outputs/apk/release/*"
63-
tag: v2.0.9.3
63+
tag: v2.0.9.4
6464
token: ${{ secrets.TOKEN }}
65-
name: "beta-v2.0.9.3"
65+
name: "beta-v2.0.9.4"
6666
body: |
67-
## What's New in v2.0.9.3
67+
## What's New in v2.0.9.4
6868
69-
- Improved Error Handlers - Catching Redis Issues step-by-step.
69+
- Base Bug Fixes for Beta.
7070
- **Redis Cloud Implementation and Fetching in Beta Phase**
7171
- **Structure of Redis added to Clean Architecture
7272
- **Added Redis-base to support syncfusion**

README.md

Lines changed: 3 additions & 3 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.3-red" alt="Version"/>
7+
<img src="https://img.shields.io/badge/version-2.0.9.4-green" alt="Version"/>
88
</p>
99

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

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

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

22-
- Improved Error Handlers - Catching Redis Issues step-by-step.
22+
- Base Bug Fixes for Beta.
2323
- **Redis Cloud Implementation and Fetching in Beta Phase**
2424
- **Structure of Redis added to Clean Architecture
2525
- **Added Redis-base to support syncfusion**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ class SignIn extends StatelessWidget {
2121
Future signIn() async {
2222
final user = await GoogleSignInApi.login();
2323
final myboxx = Hive.box('lastlogin');
24+
final first = Hive.box('firstime');
2425
if (user == null) {
2526
ScaffoldMessenger.of(context)
2627
.showSnackBar(const SnackBar(content: Text("Cancelled by User")));
2728
} else {
2829
myboxx.put('google', 'true');
30+
first.put('firsttime', 'true');
2931
Navigator.pushAndRemoveUntil(
3032
context,
3133
MaterialPageRoute(builder: (BuildContext context) => HomePage()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ class Signup extends StatelessWidget {
8787
ScaffoldMessenger.of(context).showSnackBar(snackbar);
8888
}, (r) {
8989
final mm = Hive.box('lastlogin');
90+
final first = Hive.box('firstime');
9091
mm.put("google", "false");
92+
first.put('firsttime','true');
9193
Navigator.pushAndRemoveUntil(
9294
context,
9395
MaterialPageRoute(

lib/features/meditation/presentation/pages/meditation_page.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:firebase_auth/firebase_auth.dart';
44
import 'package:flutter/material.dart';
55
import 'package:flutter_bloc/flutter_bloc.dart';
66
import 'package:google_sign_in/google_sign_in.dart';
7+
import 'package:hive/hive.dart';
78
import 'package:lottie/lottie.dart';
89
import 'package:mental_health/features/auth/domain/entities/auth/googleapisignin.dart';
910
import 'package:mental_health/features/meditation/presentation/bloc/dailyQuote/daily_quote_bloc.dart';
@@ -40,6 +41,7 @@ class _MeditationPageState extends State<MeditationPage> {
4041

4142
@override
4243
void initState() {
44+
4345
_tooltipBehavior =
4446
TooltipBehavior(enable: true, format: 'point.x : point.y%');
4547
__tooltipBehavior = _tooltipBehavior;
@@ -305,7 +307,8 @@ class _MeditationPageState extends State<MeditationPage> {
305307
Widget build(BuildContext context) {
306308
user1 = FirebaseAuth.instance.currentUser;
307309
user2 = GoogleSignInApi.details();
308-
310+
final mybox = Hive.box('firstime');
311+
String valobatained = mybox.get('firsttime');
309312
return Scaffold(
310313
backgroundColor: Colors.white,
311314
appBar: AppBar(
@@ -754,7 +757,7 @@ class _MeditationPageState extends State<MeditationPage> {
754757
textAlign: TextAlign.center,
755758
),
756759
//graph
757-
BlocBuilder<MoodDataBloc,MoodDataState>(builder: (context,state){
760+
valobatained=='true'?const SizedBox(height:50,child: Text("No data",style: TextStyle(color: Colors.black),),):BlocBuilder<MoodDataBloc,MoodDataState>(builder: (context,state){
758761
if (state is MoodDataLoaded){
759762
__chartData = <ChartSampleData>[
760763
ChartSampleData(x: 'Mon', y: num.parse(state.moodDatainfo.happy), secondSeriesYValue: num.parse(state.moodDatainfo.neutral), thirdSeriesYValue: num.parse(state.moodDatainfo.calm)),
@@ -803,7 +806,7 @@ class _MeditationPageState extends State<MeditationPage> {
803806
try {
804807
return _buildColumnChart();
805808
}catch(error){
806-
return Text("ERROR LOADING");
809+
return const Text("ERROR LOADING");
807810
}
808811
}
809812
if (state is MoodDataLoading){

lib/main.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import 'injections.dart' as di;
2424
void main() async {
2525
await Hive.initFlutter();
2626
await Hive.openBox('lastlogin');
27+
await Hive.openBox('firstime');
2728
WidgetsFlutterBinding.ensureInitialized();
2829
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
2930
await di.init();
@@ -56,9 +57,12 @@ class _MyAppState extends State<MyApp> {
5657
@override
5758
Widget build(BuildContext context) {
5859
final mybox = Hive.box('lastlogin');
60+
final first= Hive.box('firstime');
5961
final idval;
62+
first.put('firsttime','false');
6063
bool google = mybox.get('google').toString() == 'true';
6164
if (google==true) {
65+
6266
idval = "[email protected]"; //temp
6367
}else{
6468
idval = FirebaseAuth.instance.currentUser?.email.toString();
@@ -98,11 +102,13 @@ class _inPageState extends State<inPage> {
98102
Future signIn() async {
99103
final user = await GoogleSignInApi.login();
100104
final myboxx = Hive.box('lastlogin');
105+
final first = Hive.box('firstime');
101106
if (user == null) {
102107
ScaffoldMessenger.of(context)
103108
.showSnackBar(const SnackBar(content: Text("Faliure")));
104109
} else {
105110
myboxx.put('google', 'true');
111+
first.put("firsttime",'false');
106112
Navigator.pushAndRemoveUntil(
107113
context,
108114
MaterialPageRoute(builder: (BuildContext context) => HomePage()),

0 commit comments

Comments
 (0)