feat(deepLinks): added diary deep link and improved profile and chat deep links

This commit is contained in:
Username1548
2025-09-10 15:19:49 +03:00
parent 82bc51e45c
commit 6b7b1f2d18
12 changed files with 126 additions and 206 deletions

View File

@@ -138,7 +138,17 @@ class _ProfileScreenState extends State<ProfileScreen> {
Scaffold _profileScreen(ProfileStateLoaded state) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(),
appBar: AppBar(
leading: BackButton(
onPressed: () {
if (context.canPop()) {
GoRouter.of(context).pop();
return;
}
GoRouter.of(context).go('/feed-screen');
},
),
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -953,7 +963,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
},
),
if (!state.isMyProfile ) ...[
if (!state.isMyProfile) ...[
_buildDivider(),
_buildCompactItem(
icon: 'assets/icons/complain.svg',
@@ -967,7 +977,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
),
],
if (!state.isMyProfile && !state.profile.isBlockedByMe) ...[
if (!state.isMyProfile && !state.profile.isBlockedByMe) ...[
_buildDivider(),
_buildCompactItem(
icon: 'assets/icons/complain.svg',
@@ -975,7 +985,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
onTap: () {
isFirstFetch = true;
sl<BlockedUsersCubit>().blockUser(state.profile.slug);
state.isMyProfile ? profileCubit.getMyProfile() : profileCubit.getProfileBySlug(state.profile.slug);
state.isMyProfile ? profileCubit.getMyProfile() : profileCubit.getProfileBySlug(state.profile.slug);
if (state.profile.roles.contains('consultant')) {
plansCubit.getPlans(state.profile.slug);
}
@@ -991,7 +1001,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
onTap: () {
isFirstFetch = true;
sl<BlockedUsersCubit>().unblockUser(state.profile.slug);
state.isMyProfile ? profileCubit.getMyProfile() : profileCubit.getProfileBySlug(state.profile.slug);
state.isMyProfile ? profileCubit.getMyProfile() : profileCubit.getProfileBySlug(state.profile.slug);
if (state.profile.roles.contains('consultant')) {
plansCubit.getPlans(state.profile.slug);
}