feat: Refactor group deletion logic to use tripId and add reset trips functionality
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:travel_mate/blocs/trip/trip_bloc.dart';
|
||||
import 'package:travel_mate/blocs/trip/trip_event.dart';
|
||||
import '../components/home/home_content.dart';
|
||||
import '../components/settings/settings_content.dart';
|
||||
import '../components/map/map_content.dart';
|
||||
@@ -9,8 +11,6 @@ import '../blocs/user/user_bloc.dart';
|
||||
import '../blocs/user/user_event.dart';
|
||||
import '../blocs/auth/auth_bloc.dart';
|
||||
import '../blocs/auth/auth_event.dart';
|
||||
import '../blocs/trip/trip_bloc.dart';
|
||||
import '../blocs/trip/trip_event.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({super.key});
|
||||
@@ -106,8 +106,8 @@ class _HomePageState extends State<HomePage> {
|
||||
);
|
||||
|
||||
if (shouldLogout != true || !mounted) return;
|
||||
|
||||
try {
|
||||
context.read<TripBloc>().add(ResetTrips());
|
||||
context.read<UserBloc>().add(UserLoggedOut());
|
||||
_pageCache.clear();
|
||||
context.read<AuthBloc>().add(AuthSignOutRequested());
|
||||
|
||||
Reference in New Issue
Block a user