🐛 Bug fixes

This commit is contained in:
2025-07-31 16:48:50 +08:00
parent ba709012d7
commit 715f95ca22
8 changed files with 80 additions and 50 deletions

View File

@@ -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: [

View File

@@ -31,7 +31,7 @@ class StickersScreen extends HookConsumerWidget {
context
.pushNamed(
'creatorStickerPackNew',
queryParameters: {'pubName': pubName},
queryParameters: {'name': pubName},
)
.then((value) {
if (value != null) {
@@ -76,7 +76,7 @@ class SliverStickerPacksList extends HookConsumerWidget {
onTap: () {
context.pushNamed(
'creatorStickerPackDetail',
pathParameters: {'pubName': pubName, 'packId': sticker.id},
pathParameters: {'name': pubName, 'packId': sticker.id},
);
},
);

View File

@@ -395,7 +395,11 @@ class _ActivityListView extends HookConsumerWidget {
slivers: [
SliverGap(12),
if (user.value != null && !contentOnly)
SliverToBoxAdapter(child: CheckInWidget()),
SliverToBoxAdapter(
child: CheckInWidget(
margin: EdgeInsets.only(left: 8, right: 8, bottom: 4),
),
),
SliverList.builder(
itemCount: widgetCount,
itemBuilder: (context, index) {

View File

@@ -21,7 +21,6 @@ import 'package:island/widgets/post/compose_settings_sheet.dart';
import 'package:island/services/compose_storage_db.dart';
import 'package:island/widgets/post/compose_toolbar.dart';
import 'package:island/widgets/post/publishers_modal.dart';
import 'package:island/widgets/post/draft_manager.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:styled_widget/styled_widget.dart';