forked from eatvio/eatvio_app
feat(app): refactoring of sentry using, feat(become_consultant): fixed possible infinite loading, feat(push_notifications): fixed push navigation from paid plan push
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:eatvio_app/features/complaining/presentation/complaining_bottom_
|
||||
import 'package:eatvio_app/features/complaining/presentation/cubit/complaining_state.dart';
|
||||
import 'package:eatvio_app/features/complaining/repositories/complaining_repository.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:eatvio_app/core/error_reporting/report_from.dart';
|
||||
|
||||
class ComplainingCubit extends Cubit<ComplainingState> {
|
||||
final ComplainingRepository repository;
|
||||
@@ -81,6 +82,7 @@ class ComplainingCubit extends Cubit<ComplainingState> {
|
||||
}
|
||||
}
|
||||
} catch (e, st) {
|
||||
await reportFrom(e, st, this);
|
||||
log(e.toString(), stackTrace: st);
|
||||
}
|
||||
emit(state.copyWith(wasSentSuccessfully: false));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:eatvio_app/features/complaining/models/complain_model.dart';
|
||||
import 'package:eatvio_app/features/complaining/services/complaining_service.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
class ComplainingRepository {
|
||||
final ComplainingService service;
|
||||
@@ -11,12 +10,8 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendPlanComplain(slug: slug, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendPlanComplain(slug: slug, category: category, body: body);
|
||||
|
||||
}
|
||||
|
||||
Future<void> sendRecipeComplain({
|
||||
@@ -24,12 +19,8 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendRecipeComplain(slug: slug, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendRecipeComplain(slug: slug, category: category, body: body);
|
||||
|
||||
}
|
||||
|
||||
Future<void> sendBlogPostsComplain({
|
||||
@@ -37,12 +28,8 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendBlogPostsComplain(id: id, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendBlogPostsComplain(id: id, category: category, body: body);
|
||||
|
||||
}
|
||||
|
||||
Future<void> sendProfileComplain({
|
||||
@@ -50,12 +37,8 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendProfileComplain(slug: slug, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendProfileComplain(slug: slug, category: category, body: body);
|
||||
|
||||
}
|
||||
|
||||
Future<void> sendDietComplain({
|
||||
@@ -63,12 +46,8 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendDietComplain(id: id, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendDietComplain(id: id, category: category, body: body);
|
||||
|
||||
}
|
||||
|
||||
Future<void> sendCommentComplain({
|
||||
@@ -76,11 +55,7 @@ class ComplainingRepository {
|
||||
required String category,
|
||||
required ComplainModel body,
|
||||
}) async {
|
||||
try {
|
||||
await service.sendCommentComplain(id: id, category: category, body: body);
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await service.sendCommentComplain(id: id, category: category, body: body);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user