fixed pagination

This commit is contained in:
Username1548
2025-03-13 02:30:10 +07:00
parent 102dc9ee55
commit 9d53760137
38 changed files with 778 additions and 294 deletions

View File

@@ -101,8 +101,9 @@ class ProfileCubit extends Cubit<ProfileState> {
}) async {
try {
return (await chatRepository.getChatRoomIdByUserSlug(slug: slug)).id;
} catch (e) {
rethrow;
} catch (e, st) {
log(e.toString(), stackTrace: st);
return '';
}
}

View File

@@ -1079,7 +1079,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
onTap: () async {
GoRouter.of(context).pushNamed(
'chatScreen',
extra: await profileCubit.getChatRoomIdBySlug(slug: widget.author!.authorSlug),
extra: {
'chatId': await profileCubit.getChatRoomIdBySlug(slug: widget.author!.authorSlug),
},
);
},
child: Container(

View File

@@ -62,8 +62,10 @@ class _SubActionButtonWidgetState extends State<SubActionButtonWidget> {
return InkWell(
onTap: () async {
GoRouter.of(context).pushNamed(
'chatScreen',
extra: await sl<ProfileCubit>().getChatRoomIdBySlug(slug: widget.slug),
'chatScreen',
extra: {
'chatId': await sl<ProfileCubit>().getChatRoomIdBySlug(slug: widget.slug),
},
);
},
borderRadius: BorderRadius.circular(8),