🐛 Bug fixes
This commit is contained in:
@@ -26,7 +26,7 @@ part 'pack_detail.freezed.dart';
|
||||
@riverpod
|
||||
Future<List<SnSticker>> stickerPackContent(Ref ref, String packId) async {
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
final resp = await apiClient.get('/stickers/$packId/content');
|
||||
final resp = await apiClient.get('/sphere/stickers/$packId/content');
|
||||
return resp.data
|
||||
.map<SnSticker>((e) => SnSticker.fromJson(e))
|
||||
.cast<SnSticker>()
|
||||
@@ -74,13 +74,16 @@ class StickerPackDetailScreen extends HookConsumerWidget {
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.add_circle),
|
||||
onPressed: () {
|
||||
context.pushNamed('creatorStickerNew', pathParameters: {'packId': id}).then((
|
||||
value,
|
||||
) {
|
||||
if (value != null) {
|
||||
ref.invalidate(stickerPackContentProvider(id));
|
||||
}
|
||||
});
|
||||
context
|
||||
.pushNamed(
|
||||
'creatorStickerNew',
|
||||
pathParameters: {'name': pubName, 'packId': id},
|
||||
)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
ref.invalidate(stickerPackContentProvider(id));
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
_StickerPackActionMenu(
|
||||
@@ -173,9 +176,13 @@ class StickerPackDetailScreen extends HookConsumerWidget {
|
||||
title: 'edit'.tr(),
|
||||
image: MenuImage.icon(Symbols.edit),
|
||||
callback: () {
|
||||
context.pushNamed(
|
||||
context
|
||||
.pushNamed(
|
||||
'creatorStickerEdit',
|
||||
pathParameters: {'packId': id, 'id': sticker.id},
|
||||
pathParameters: {
|
||||
'packId': id,
|
||||
'id': sticker.id,
|
||||
},
|
||||
)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
@@ -259,9 +266,7 @@ class _StickerPackActionMenu extends HookConsumerWidget {
|
||||
(context) => [
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
context.push(
|
||||
'/creators/$pubName/stickers/$packId/edit',
|
||||
);
|
||||
context.push('/creators/$pubName/stickers/$packId/edit');
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
|
Reference in New Issue
Block a user