Skip to content

Commit

Permalink
redis-bug-fixes:2
Browse files Browse the repository at this point in the history
  • Loading branch information
ARYPROGRAMMER committed Oct 8, 2024
1 parent f753d03 commit 5854f9a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*"
tag: v2.0.9.3
tag: v2.0.9.4
token: ${{ secrets.TOKEN }}
name: "beta-v2.0.9.3"
name: "beta-v2.0.9.4"
body: |
## What's New in v2.0.9.3
## What's New in v2.0.9.4
- Improved Error Handlers - Catching Redis Issues step-by-step.
- Base Bug Fixes for Beta.
- **Redis Cloud Implementation and Fetching in Beta Phase**
- **Structure of Redis added to Clean Architecture
- **Added Redis-base to support syncfusion**
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a href="https://github.com/ARYPROGRAMMER/Mindful-App/actions">
<img src="https://github.com/travisjeffery/timecop/workflows/CI/badge.svg" alt="Build Status"/>
</a>
<img src="https://img.shields.io/badge/version-2.0.9.3-red" alt="Version"/>
<img src="https://img.shields.io/badge/version-2.0.9.4-green" alt="Version"/>
</p>

<p align="center">
Expand All @@ -17,9 +17,9 @@

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

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

- Improved Error Handlers - Catching Redis Issues step-by-step.
- Base Bug Fixes for Beta.
- **Redis Cloud Implementation and Fetching in Beta Phase**
- **Structure of Redis added to Clean Architecture
- **Added Redis-base to support syncfusion**
Expand Down
2 changes: 2 additions & 0 deletions lib/features/auth/presentation/auth/pages/signin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ class SignIn extends StatelessWidget {
Future signIn() async {
final user = await GoogleSignInApi.login();
final myboxx = Hive.box('lastlogin');
final first = Hive.box('firstime');
if (user == null) {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(content: Text("Cancelled by User")));
} else {
myboxx.put('google', 'true');
first.put('firsttime', 'true');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (BuildContext context) => HomePage()),
Expand Down
2 changes: 2 additions & 0 deletions lib/features/auth/presentation/auth/pages/signup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class Signup extends StatelessWidget {
ScaffoldMessenger.of(context).showSnackBar(snackbar);
}, (r) {
final mm = Hive.box('lastlogin');
final first = Hive.box('firstime');
mm.put("google", "false");
first.put('firsttime','true');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:hive/hive.dart';
import 'package:lottie/lottie.dart';
import 'package:mental_health/features/auth/domain/entities/auth/googleapisignin.dart';
import 'package:mental_health/features/meditation/presentation/bloc/dailyQuote/daily_quote_bloc.dart';
Expand Down Expand Up @@ -40,6 +41,7 @@ class _MeditationPageState extends State<MeditationPage> {

@override
void initState() {

_tooltipBehavior =
TooltipBehavior(enable: true, format: 'point.x : point.y%');
__tooltipBehavior = _tooltipBehavior;
Expand Down Expand Up @@ -305,7 +307,8 @@ class _MeditationPageState extends State<MeditationPage> {
Widget build(BuildContext context) {
user1 = FirebaseAuth.instance.currentUser;
user2 = GoogleSignInApi.details();

final mybox = Hive.box('firstime');
String valobatained = mybox.get('firsttime');
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
Expand Down Expand Up @@ -754,7 +757,7 @@ class _MeditationPageState extends State<MeditationPage> {
textAlign: TextAlign.center,
),
//graph
BlocBuilder<MoodDataBloc,MoodDataState>(builder: (context,state){
valobatained=='true'?const SizedBox(height:50,child: Text("No data",style: TextStyle(color: Colors.black),),):BlocBuilder<MoodDataBloc,MoodDataState>(builder: (context,state){
if (state is MoodDataLoaded){
__chartData = <ChartSampleData>[
ChartSampleData(x: 'Mon', y: num.parse(state.moodDatainfo.happy), secondSeriesYValue: num.parse(state.moodDatainfo.neutral), thirdSeriesYValue: num.parse(state.moodDatainfo.calm)),
Expand Down Expand Up @@ -803,7 +806,7 @@ class _MeditationPageState extends State<MeditationPage> {
try {
return _buildColumnChart();
}catch(error){
return Text("ERROR LOADING");
return const Text("ERROR LOADING");
}
}
if (state is MoodDataLoading){
Expand Down
6 changes: 6 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import 'injections.dart' as di;
void main() async {
await Hive.initFlutter();
await Hive.openBox('lastlogin');
await Hive.openBox('firstime');
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
await di.init();
Expand Down Expand Up @@ -56,9 +57,12 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
final mybox = Hive.box('lastlogin');
final first= Hive.box('firstime');
final idval;
first.put('firsttime','false');
bool google = mybox.get('google').toString() == 'true';
if (google==true) {

idval = "aryasingh8405@gmail.com-google"; //temp
}else{
idval = FirebaseAuth.instance.currentUser?.email.toString();
Expand Down Expand Up @@ -98,11 +102,13 @@ class _inPageState extends State<inPage> {
Future signIn() async {
final user = await GoogleSignInApi.login();
final myboxx = Hive.box('lastlogin');
final first = Hive.box('firstime');
if (user == null) {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(content: Text("Faliure")));
} else {
myboxx.put('google', 'true');
first.put("firsttime",'false');
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (BuildContext context) => HomePage()),
Expand Down

0 comments on commit 5854f9a

Please sign in to comment.