🐛 Dozens of bug fixes

This commit is contained in:
2025-08-11 01:56:19 +08:00
parent c061ef2132
commit d1fbe5f15e
4 changed files with 809 additions and 686 deletions

View File

@@ -790,5 +790,7 @@
"linkValue": "URL", "linkValue": "URL",
"debugOptions": "Debug Options", "debugOptions": "Debug Options",
"joinedAt": "Joined at {}", "joinedAt": "Joined at {}",
"searchAccounts": "Search accounts..." "searchAccounts": "Search accounts...",
"webFeeds": "Web Feeds",
"polls": "Polls"
} }

File diff suppressed because it is too large Load Diff

View File

@@ -236,7 +236,7 @@ class AccountScreen extends HookConsumerWidget {
), ),
ListTile( ListTile(
minTileHeight: 48, minTileHeight: 48,
title: Text('abuseReports').tr(), title: Text('abuseReport').tr(),
contentPadding: const EdgeInsets.symmetric(horizontal: 24), contentPadding: const EdgeInsets.symmetric(horizontal: 24),
leading: const Icon(Symbols.gavel), leading: const Icon(Symbols.gavel),
trailing: const Icon(Symbols.chevron_right), trailing: const Icon(Symbols.chevron_right),

View File

@@ -382,7 +382,7 @@ class CreatorHubScreen extends HookConsumerWidget {
), ),
ListTile( ListTile(
minTileHeight: 48, minTileHeight: 48,
title: const Text('Polls'), title: Text('polls').tr(),
trailing: const Icon(Symbols.chevron_right), trailing: const Icon(Symbols.chevron_right),
leading: const Icon(Symbols.poll), leading: const Icon(Symbols.poll),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
@@ -419,7 +419,7 @@ class CreatorHubScreen extends HookConsumerWidget {
), ),
ListTile( ListTile(
minTileHeight: 48, minTileHeight: 48,
title: const Text('Web Feeds').tr(), title: const Text('webFeeds').tr(),
trailing: const Icon(Symbols.chevron_right), trailing: const Icon(Symbols.chevron_right),
leading: const Icon(Symbols.rss_feed), leading: const Icon(Symbols.rss_feed),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
@@ -659,7 +659,7 @@ class PublisherMemberNotifier extends StateNotifier<PublisherMemberState> {
try { try {
final response = await _apiClient.get( final response = await _apiClient.get(
'/publishers/$publisherUname/members', '/sphere/publishers/$publisherUname/members',
queryParameters: {'offset': offset, 'take': take}, queryParameters: {'offset': offset, 'take': take},
); );
@@ -720,6 +720,9 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
'/publishers/$publisherUname/invites', '/publishers/$publisherUname/invites',
data: {'related_user_id': result.id, 'role': 0}, data: {'related_user_id': result.id, 'role': 0},
); );
// Refresh both providers
memberNotifier.reset();
await memberNotifier.loadMore();
ref.invalidate(memberListProvider); ref.invalidate(memberListProvider);
} catch (err) { } catch (err) {
showErrorAlert(err); showErrorAlert(err);
@@ -823,6 +826,9 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
), ),
).then((value) { ).then((value) {
if (value != null) { if (value != null) {
// Refresh both providers
memberNotifier.reset();
memberNotifier.loadMore();
ref.invalidate(memberListProvider); ref.invalidate(memberListProvider);
} }
}); });
@@ -844,6 +850,9 @@ class _PublisherMemberListSheet extends HookConsumerWidget {
await apiClient.delete( await apiClient.delete(
'/publishers/$publisherUname/members/${member.accountId}', '/publishers/$publisherUname/members/${member.accountId}',
); );
// Refresh both providers
memberNotifier.reset();
memberNotifier.loadMore();
ref.invalidate(memberListProvider); ref.invalidate(memberListProvider);
} catch (err) { } catch (err) {
showErrorAlert(err); showErrorAlert(err);