From b7128115f1cc41d19200f87fbcaef344bdb4e087 Mon Sep 17 00:00:00 2001 From: Owais Date: Sat, 16 May 2026 15:40:19 +0000 Subject: [PATCH] refactor: migrate Bluesky lexicons to split Poptart packages (#51) --- pubspec.lock | 24 ++++++++++++++++-------- pubspec.yaml | 3 ++- lib/core/cache/poptart_cache_codecs.dart | 6 +++--- lib/core/network/poptart_client_adapter.dart | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------- lib/core/scheduler/post_scheduler.dart | 12 ++++++------ lib/shared/utils/format_utils.dart | 2 +- lib/shared/utils/parse_utils.dart | 2 +- test/core/cache/poptart_cache_codecs_test.dart | 4 ++-- test/core/network/poptart_client_adapter_test.dart | 8 ++++---- test/core/router/app_router_test.dart | 2 +- test/shared/utils/format_utils_test.dart | 4 ++-- lib/features/alerts/presentation/alerts_screen.dart | 2 +- lib/features/compose/bloc/compose_bloc.dart | 18 +++++++++--------- lib/features/devtools/cubit/dev_tools_cubit.dart | 4 ++-- lib/features/devtools/presentation/dev_tools_screen.dart | 2 +- lib/features/feed/bloc/feed_bloc.dart | 2 +- lib/features/feed/cubit/feed_preferences_cubit.dart | 4 ++-- lib/features/feed/cubit/post_thread_cubit.dart | 2 +- lib/features/feed/cubit/saved_posts_cubit.dart | 4 ++-- lib/features/feed/data/feed_repository.dart | 8 ++++---- lib/features/feed/data/liked_posts_repository.dart | 2 +- lib/features/feed/data/post_action_repository.dart | 8 ++++---- lib/features/feed/data/post_thread_repository.dart | 4 ++-- lib/features/feed/data/trending_join.dart | 2 +- lib/features/feed/presentation/feed_detail_screen.dart | 2 +- lib/features/feed/presentation/feed_management_screen.dart | 4 ++-- lib/features/feed/presentation/home_feed_screen.dart | 4 ++-- lib/features/feed/presentation/post_thread_screen.dart | 6 +++--- lib/features/feed/presentation/saved_posts_screen.dart | 2 +- lib/features/lists/bloc/list_bloc.dart | 2 +- lib/features/lists/bloc/list_feed_bloc.dart | 2 +- lib/features/lists/cubit/add_to_list_cubit.dart | 2 +- lib/features/lists/cubit/my_lists_cubit.dart | 2 +- lib/features/lists/data/list_repository.dart | 12 ++++++------ lib/features/lists/presentation/list_detail_screen.dart | 4 ++-- lib/features/lists/presentation/list_members_screen.dart | 2 +- lib/features/lists/presentation/my_lists_screen.dart | 2 +- lib/features/messages/bloc/convo_list_bloc.dart | 2 +- lib/features/messages/bloc/message_bloc.dart | 2 +- lib/features/messages/data/convo_repository.dart | 4 ++-- lib/features/messages/presentation/message_thread_screen.dart | 2 +- lib/features/moderation/data/moderation_service.dart | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------- lib/features/moderation/domain/moderation_models.dart | 574 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/features/moderation/presentation/moderation_ui_helpers.dart | 4 ++-- lib/features/notifications/bloc/notification_bloc.dart | 2 +- lib/features/notifications/data/notification_repository.dart | 6 +++--- lib/features/notifications/domain/notification_domain_service.dart | 2 +- lib/features/notifications/domain/notification_local_mappers.dart | 2 +- lib/features/notifications/domain/notification_reason_utils.dart | 2 +- lib/features/profile/bloc/profile_bloc.dart | 2 +- lib/features/profile/cubit/profile_connections_cubit.dart | 2 +- lib/features/profile/cubit/profile_context_cubit.dart | 4 ++-- lib/features/profile/cubit/suggested_follows_cubit.dart | 2 +- lib/features/profile/data/follow_audit_repository.dart | 4 ++-- lib/features/profile/data/profile_context_repository.dart | 6 +++--- lib/features/profile/data/profile_repository.dart | 8 ++++---- lib/features/profile/presentation/profile_connections_screen.dart | 2 +- lib/features/profile/presentation/profile_context_screen.dart | 4 ++-- lib/features/profile/presentation/profile_edit_screen.dart | 2 +- lib/features/profile/presentation/profile_screen.dart | 8 ++++---- lib/features/search/bloc/search_bloc.dart | 6 +++--- lib/features/search/cubit/hashtag_cubit.dart | 2 +- lib/features/search/cubit/topic_cubit.dart | 2 +- lib/features/search/data/hashtag_utils.dart | 6 +++--- lib/features/search/data/post_text_extractor.dart | 6 +++--- lib/features/search/data/search_repository.dart | 8 ++++---- lib/features/search/presentation/hashtag_screen.dart | 2 +- lib/features/search/presentation/search_screen.dart | 6 +++--- lib/features/search/presentation/semantic_search_tab.dart | 2 +- lib/features/search/presentation/topic_screen.dart | 2 +- lib/features/settings/data/video_repository.dart | 2 +- lib/features/starter_packs/bloc/starter_pack_bloc.dart | 2 +- lib/features/starter_packs/cubit/actor_starter_packs_cubit.dart | 2 +- lib/features/starter_packs/data/starter_pack_repository.dart | 8 ++++---- lib/features/starter_packs/presentation/create_edit_starter_pack_screen.dart | 4 ++-- lib/features/starter_packs/presentation/starter_pack_detail_screen.dart | 4 ++-- lib/features/typeahead/data/typeahead_repository.dart | 2 +- lib/features/typeahead/data/typeahead_result.dart | 2 +- lib/shared/presentation/helpers/notification_icon_mapper.dart | 2 +- lib/shared/presentation/widgets/profile_avatar.dart | 2 +- test/features/alerts/presentation/alerts_screen_test.dart | 8 ++++---- test/features/compose/bloc/compose_bloc_test.dart | 6 +++--- test/features/compose/presentation/compose_screen_test.dart | 2 +- test/features/devtools/cubit/dev_tools_cubit_test.dart | 2 +- test/features/devtools/cubit/dev_tools_state_test.dart | 2 +- test/features/devtools/presentation/dev_tools_screen_test.dart | 2 +- test/features/feed/bloc/feed_bloc_test.dart | 4 ++-- test/features/feed/cubit/feed_preferences_cubit_test.dart | 4 ++-- test/features/feed/cubit/post_thread_cubit_test.dart | 4 ++-- test/features/feed/cubit/saved_posts_cubit_test.dart | 8 ++++---- test/features/feed/data/feed_repository_cache_test.dart | 6 +++--- test/features/feed/data/feed_repository_test.dart | 4 ++-- test/features/feed/data/liked_posts_repository_test.dart | 6 +++--- test/features/feed/data/post_action_repository_test.dart | 8 ++++---- test/features/feed/data/post_thread_repository_cache_test.dart | 6 +++--- test/features/feed/data/post_thread_repository_test.dart | 4 ++-- test/features/feed/data/trending_join_test.dart | 4 ++-- test/features/feed/presentation/compact_post_card_test.dart | 6 +++--- test/features/feed/presentation/feed_detail_screen_test.dart | 4 ++-- test/features/feed/presentation/grid_post_card_test.dart | 10 +++++----- test/features/feed/presentation/home_feed_screen_test.dart | 2 +- test/features/feed/presentation/post_card_test.dart | 16 ++++++++-------- test/features/feed/presentation/post_card_with_actions_test.dart | 4 ++-- test/features/feed/presentation/post_interactions_sheet_test.dart | 10 +++++----- test/features/feed/presentation/post_quote_repost_sheet_test.dart | 12 ++++++------ test/features/feed/presentation/post_thread_edit_flow_test.dart | 12 ++++++------ test/features/feed/presentation/post_thread_screen_test.dart | 4 ++-- test/features/feed/presentation/saved_posts_screen_test.dart | 6 +++--- test/features/feed/presentation/trending_screen_test.dart | 2 +- test/features/lists/bloc/list_bloc_test.dart | 16 ++++++++++++---- test/features/lists/bloc/list_feed_bloc_test.dart | 4 ++-- test/features/lists/cubit/add_to_list_cubit_test.dart | 6 +++--- test/features/lists/cubit/my_lists_cubit_test.dart | 10 +++++++--- test/features/lists/data/list_repository_test.dart | 16 ++++++++-------- test/features/lists/presentation/list_detail_screen_test.dart | 4 ++-- test/features/lists/presentation/list_members_screen_test.dart | 4 ++-- test/features/lists/presentation/my_lists_screen_test.dart | 4 ++-- test/features/messages/bloc/convo_list_bloc_test.dart | 2 +- test/features/messages/bloc/message_bloc_test.dart | 4 ++-- test/features/messages/data/convo_repository_test.dart | 2 +- test/features/messages/presentation/convo_list_screen_test.dart | 4 ++-- test/features/messages/presentation/message_thread_screen_test.dart | 4 ++-- test/features/moderation/data/moderation_service_test.dart | 12 ++++++------ test/features/moderation/presentation/moderation_screens_test.dart | 8 ++++---- test/features/notifications/bloc/notification_bloc_test.dart | 4 ++-- test/features/notifications/data/notification_repository_test.dart | 4 ++-- test/features/notifications/domain/notification_domain_service_test.dart | 4 ++-- test/features/notifications/domain/notification_local_mappers_test.dart | 4 ++-- test/features/notifications/domain/notification_push_payload_processing_test.dart | 4 ++-- test/features/notifications/domain/notification_reason_utils_test.dart | 2 +- test/features/notifications/presentation/notifications_screen_test.dart | 4 ++-- test/features/profile/bloc/profile_bloc_test.dart | 2 +- test/features/profile/cubit/profile_connections_cubit_test.dart | 2 +- test/features/profile/cubit/profile_context_cubit_test.dart | 4 ++-- test/features/profile/cubit/suggested_follows_cubit_test.dart | 2 +- test/features/profile/data/follow_audit_repository_test.dart | 4 ++-- test/features/profile/data/profile_context_repository_test.dart | 8 ++++---- test/features/profile/data/profile_repository_actor_likes_test.dart | 8 ++++---- test/features/profile/data/profile_repository_test.dart | 10 +++++----- test/features/profile/presentation/profile_connections_screen_test.dart | 2 +- test/features/profile/presentation/profile_context_screen_test.dart | 4 ++-- test/features/profile/presentation/profile_edit_screen_test.dart | 2 +- test/features/profile/presentation/profile_screen_test.dart | 6 +++--- test/features/search/bloc/search_bloc_test.dart | 6 +++--- test/features/search/cubit/hashtag_cubit_test.dart | 4 ++-- test/features/search/cubit/topic_cubit_test.dart | 4 ++-- test/features/search/data/hashtag_utils_test.dart | 8 ++++---- test/features/search/data/post_text_extractor_test.dart | 14 +++++++------- test/features/search/data/search_repository_post_filters_test.dart | 6 +++--- test/features/search/data/search_repository_test.dart | 6 +++--- test/features/search/presentation/hashtag_screen_test.dart | 4 ++-- test/features/search/presentation/profile_post_search_screen_test.dart | 4 ++-- test/features/search/presentation/search_screen_test.dart | 4 ++-- test/features/settings/data/video_repository_test.dart | 2 +- test/features/starter_packs/bloc/starter_pack_bloc_test.dart | 4 ++-- test/features/starter_packs/cubit/actor_starter_packs_cubit_test.dart | 4 ++-- test/features/starter_packs/presentation/actor_starter_packs_screen_test.dart | 4 ++-- test/features/starter_packs/presentation/create_edit_starter_pack_screen_test.dart | 4 ++-- test/features/starter_packs/presentation/starter_pack_detail_screen_test.dart | 6 +++--- test/features/typeahead/data/typeahead_repository_test.dart | 4 ++-- test/shared/presentation/helpers/notification_icon_mapper_test.dart | 2 +- lib/features/feed/presentation/widgets/compact_post_card.dart | 6 +++--- lib/features/feed/presentation/widgets/facet_text.dart | 2 +- lib/features/feed/presentation/widgets/grid_post_card.dart | 8 ++++---- lib/features/feed/presentation/widgets/post_card.dart | 6 +++--- lib/features/feed/presentation/widgets/post_card_with_actions.dart | 6 +++--- lib/features/feed/presentation/widgets/post_embed_view.dart | 14 +++++++------- lib/features/feed/presentation/widgets/post_interactions_sheet.dart | 2 +- lib/features/feed/presentation/widgets/post_menu_actions.dart | 2 +- lib/features/feed/presentation/widgets/post_quote_repost_sheet.dart | 6 +++--- lib/features/feed/presentation/widgets/post_repost_context.dart | 2 +- lib/features/lists/presentation/widgets/create_edit_list_dialog.dart | 2 +- lib/features/lists/presentation/widgets/list_row_tile.dart | 2 +- lib/features/messages/presentation/widgets/convo_list_item.dart | 2 +- lib/features/messages/presentation/widgets/convo_list_pane.dart | 2 +- lib/features/messages/presentation/widgets/message_bubble.dart | 2 +- lib/features/moderation/presentation/screens/labeler_detail_screen.dart | 4 ++-- lib/features/moderation/presentation/screens/moderation_settings_screen.dart | 4 ++-- lib/features/moderation/presentation/widgets/moderated_avatar.dart | 2 +- lib/features/moderation/presentation/widgets/moderated_blur_overlay.dart | 2 +- lib/features/moderation/presentation/widgets/moderation_badge_row.dart | 2 +- lib/features/notifications/presentation/widgets/grouped_notification_list_item.dart | 6 +++--- lib/features/notifications/presentation/widgets/notification_list_item.dart | 4 ++-- lib/features/notifications/presentation/widgets/notifications_pane.dart | 2 +- lib/features/profile/presentation/widgets/profile_liked_posts_pane.dart | 2 +- lib/features/profile/presentation/widgets/suggested_follows_list.dart | 2 +- lib/features/search/presentation/widgets/follow_button.dart | 2 +- lib/features/starter_packs/presentation/widgets/starter_pack_card.dart | 2 +- test/features/feed/presentation/widgets/facet_text_test.dart | 2 +- test/features/messages/presentation/widgets/convo_list_item_test.dart | 4 ++-- test/features/messages/presentation/widgets/message_bubble_test.dart | 2 +- test/features/moderation/presentation/widgets/moderation_badge_row_test.dart | 2 +- test/features/notifications/presentation/widgets/notification_list_item_test.dart | 4 ++-- test/features/profile/presentation/widgets/suggested_follows_sheet_test.dart | 2 +- 194 file(s) changed, 1363 insertion(s)(+), 583 deletion(s)(-) diff --git a/pubspec.lock b/pubspec.lock --- a/pubspec.lock +++ b/pubspec.lock @@ -65,6 +65,14 @@ url: "https://pub.dev" source: hosted version: "10.0.0" + bluesky_poptart: + dependency: "direct main" + description: + name: bluesky_poptart + sha256: c55e2ac06fcf8f90aac18c90ef280216c48da1bbf4bac9d84b01bb69079b6b5c + url: "https://pub.dev" + source: hosted + version: "0.1.0" boolean_selector: dependency: transitive description: @@ -1021,6 +1029,14 @@ url: "https://pub.dev" source: hosted version: "2.1.0" + ozone_poptart: + dependency: "direct main" + description: + name: ozone_poptart + sha256: "2764e4a75d9e2119b00717e30975b3b2f3983c4c7f1079e6ee24bba40608a38b" + url: "https://pub.dev" + source: hosted + version: "0.1.0" package_config: dependency: transitive description: @@ -1210,14 +1226,6 @@ description: name: poptart sha256: "5631a6e4a1ffa25101db2aa76b82e2410941fa5fec4d4c18ea2c2c7d95b70f0b" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - poptart_bluesky_moderation: - dependency: "direct main" - description: - name: poptart_bluesky_moderation - sha256: d9d4cdcd04e5874edc8eadf0cd39f5e6e0e23a7d362a67876430ddb39c8ccf79 url: "https://pub.dev" source: hosted version: "0.1.0" diff --git a/pubspec.yaml b/pubspec.yaml --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,9 +16,10 @@ poptart_core: ^0.1.0 poptart_oauth: ^0.1.0 poptart_lex: ^0.1.0 + bluesky_poptart: ^0.1.0 + ozone_poptart: ^0.1.0 poptart_xrpc: ^0.1.0 poptart_bluesky_text: ^0.1.0 - poptart_bluesky_moderation: ^0.1.0 flutter_bloc: ^9.1.1 drift: ^2.24.0 drift_flutter: ^0.2.8 diff --git a/lib/core/cache/poptart_cache_codecs.dart b/lib/core/cache/poptart_cache_codecs.dart --- a/lib/core/cache/poptart_cache_codecs.dart +++ b/lib/core/cache/poptart_cache_codecs.dart @@ -1,8 +1,8 @@ import 'dart:convert'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/labeler/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/labeler/defs.dart'; class JsonStringCacheCodec { const JsonStringCacheCodec({required this.encode, required this.decode}); diff --git a/lib/core/network/poptart_client_adapter.dart b/lib/core/network/poptart_client_adapter.dart --- a/lib/core/network/poptart_client_adapter.dart +++ b/lib/core/network/poptart_client_adapter.dart @@ -3,76 +3,76 @@ import 'package:lazurite/shared/utils/atproto_datetime.dart'; import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/actor/get_preferences.dart'; -import 'package:poptart_lex/app/bsky/actor/get_profile.dart'; -import 'package:poptart_lex/app/bsky/actor/get_profiles.dart'; -import 'package:poptart_lex/app/bsky/actor/put_preferences.dart'; -import 'package:poptart_lex/app/bsky/actor/search_actors.dart'; -import 'package:poptart_lex/app/bsky/actor/search_actors_typeahead.dart'; -import 'package:poptart_lex/app/bsky/bookmark/create_bookmark.dart'; -import 'package:poptart_lex/app/bsky/bookmark/delete_bookmark.dart'; -import 'package:poptart_lex/app/bsky/bookmark/get_bookmarks.dart'; -import 'package:poptart_lex/app/bsky/feed/get_actor_likes.dart'; -import 'package:poptart_lex/app/bsky/feed/get_author_feed.dart'; -import 'package:poptart_lex/app/bsky/feed/get_feed.dart'; -import 'package:poptart_lex/app/bsky/feed/get_feed_generator.dart'; -import 'package:poptart_lex/app/bsky/feed/get_feed_generators.dart'; -import 'package:poptart_lex/app/bsky/feed/get_likes.dart'; -import 'package:poptart_lex/app/bsky/feed/get_list_feed.dart'; -import 'package:poptart_lex/app/bsky/feed/get_post_thread.dart'; -import 'package:poptart_lex/app/bsky/feed/get_posts.dart'; -import 'package:poptart_lex/app/bsky/feed/get_quotes.dart'; -import 'package:poptart_lex/app/bsky/feed/get_reposted_by.dart'; -import 'package:poptart_lex/app/bsky/feed/get_suggested_feeds.dart'; -import 'package:poptart_lex/app/bsky/feed/get_timeline.dart'; -import 'package:poptart_lex/app/bsky/feed/like.dart'; -import 'package:poptart_lex/app/bsky/feed/post.dart'; -import 'package:poptart_lex/app/bsky/feed/repost.dart'; -import 'package:poptart_lex/app/bsky/feed/search_posts.dart'; -import 'package:poptart_lex/app/bsky/graph/block.dart'; -import 'package:poptart_lex/app/bsky/graph/defs.dart'; -import 'package:poptart_lex/app/bsky/graph/follow.dart'; -import 'package:poptart_lex/app/bsky/graph/get_actor_starter_packs.dart'; -import 'package:poptart_lex/app/bsky/graph/get_followers.dart'; -import 'package:poptart_lex/app/bsky/graph/get_follows.dart'; -import 'package:poptart_lex/app/bsky/graph/get_list.dart'; -import 'package:poptart_lex/app/bsky/graph/get_lists.dart'; -import 'package:poptart_lex/app/bsky/graph/get_lists_with_membership.dart'; -import 'package:poptart_lex/app/bsky/graph/get_starter_pack.dart'; -import 'package:poptart_lex/app/bsky/graph/get_suggested_follows_by_actor.dart'; -import 'package:poptart_lex/app/bsky/graph/list.dart'; -import 'package:poptart_lex/app/bsky/graph/listblock.dart'; -import 'package:poptart_lex/app/bsky/graph/listitem.dart'; -import 'package:poptart_lex/app/bsky/graph/mute_actor.dart'; -import 'package:poptart_lex/app/bsky/graph/mute_actor_list.dart'; -import 'package:poptart_lex/app/bsky/graph/search_starter_packs.dart'; -import 'package:poptart_lex/app/bsky/graph/starterpack.dart'; -import 'package:poptart_lex/app/bsky/graph/unmute_actor.dart'; -import 'package:poptart_lex/app/bsky/graph/unmute_actor_list.dart'; -import 'package:poptart_lex/app/bsky/labeler/get_services.dart'; -import 'package:poptart_lex/app/bsky/notification/get_unread_count.dart'; -import 'package:poptart_lex/app/bsky/notification/list_notifications.dart'; -import 'package:poptart_lex/app/bsky/notification/register_push.dart'; -import 'package:poptart_lex/app/bsky/notification/unregister_push.dart'; -import 'package:poptart_lex/app/bsky/notification/update_seen.dart'; -import 'package:poptart_lex/app/bsky/richtext/facet.dart'; -import 'package:poptart_lex/app/bsky/unspecced/get_popular_feed_generators.dart'; -import 'package:poptart_lex/app/bsky/unspecced/get_trending_topics.dart'; -import 'package:poptart_lex/app/bsky/unspecced/get_trends.dart'; -import 'package:poptart_lex/app/bsky/video/defs.dart'; -import 'package:poptart_lex/app/bsky/video/get_job_status.dart'; -import 'package:poptart_lex/app/bsky/video/get_upload_limits.dart'; -import 'package:poptart_lex/app/bsky/video/upload_video.dart'; -import 'package:poptart_lex/chat/bsky/convo/defs.dart'; -import 'package:poptart_lex/chat/bsky/convo/delete_message_for_self.dart'; -import 'package:poptart_lex/chat/bsky/convo/get_convo_for_members.dart'; -import 'package:poptart_lex/chat/bsky/convo/get_messages.dart'; -import 'package:poptart_lex/chat/bsky/convo/list_convos.dart'; -import 'package:poptart_lex/chat/bsky/convo/mute_convo.dart'; -import 'package:poptart_lex/chat/bsky/convo/send_message.dart'; -import 'package:poptart_lex/chat/bsky/convo/unmute_convo.dart'; -import 'package:poptart_lex/chat/bsky/convo/update_read.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/get_preferences.dart'; +import 'package:bluesky_poptart/app/bsky/actor/get_profile.dart'; +import 'package:bluesky_poptart/app/bsky/actor/get_profiles.dart'; +import 'package:bluesky_poptart/app/bsky/actor/put_preferences.dart'; +import 'package:bluesky_poptart/app/bsky/actor/search_actors.dart'; +import 'package:bluesky_poptart/app/bsky/actor/search_actors_typeahead.dart'; +import 'package:bluesky_poptart/app/bsky/bookmark/create_bookmark.dart'; +import 'package:bluesky_poptart/app/bsky/bookmark/delete_bookmark.dart'; +import 'package:bluesky_poptart/app/bsky/bookmark/get_bookmarks.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_actor_likes.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_author_feed.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_feed.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_feed_generator.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_feed_generators.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_likes.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_list_feed.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_post_thread.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_posts.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_quotes.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_reposted_by.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_suggested_feeds.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_timeline.dart'; +import 'package:bluesky_poptart/app/bsky/feed/like.dart'; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; +import 'package:bluesky_poptart/app/bsky/feed/repost.dart'; +import 'package:bluesky_poptart/app/bsky/feed/search_posts.dart'; +import 'package:bluesky_poptart/app/bsky/graph/block.dart'; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/follow.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_actor_starter_packs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_followers.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_follows.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_list.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_lists.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_lists_with_membership.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_starter_pack.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_suggested_follows_by_actor.dart'; +import 'package:bluesky_poptart/app/bsky/graph/list.dart'; +import 'package:bluesky_poptart/app/bsky/graph/listblock.dart'; +import 'package:bluesky_poptart/app/bsky/graph/listitem.dart'; +import 'package:bluesky_poptart/app/bsky/graph/mute_actor.dart'; +import 'package:bluesky_poptart/app/bsky/graph/mute_actor_list.dart'; +import 'package:bluesky_poptart/app/bsky/graph/search_starter_packs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/starterpack.dart'; +import 'package:bluesky_poptart/app/bsky/graph/unmute_actor.dart'; +import 'package:bluesky_poptart/app/bsky/graph/unmute_actor_list.dart'; +import 'package:bluesky_poptart/app/bsky/labeler/get_services.dart'; +import 'package:bluesky_poptart/app/bsky/notification/get_unread_count.dart'; +import 'package:bluesky_poptart/app/bsky/notification/list_notifications.dart'; +import 'package:bluesky_poptart/app/bsky/notification/register_push.dart'; +import 'package:bluesky_poptart/app/bsky/notification/unregister_push.dart'; +import 'package:bluesky_poptart/app/bsky/notification/update_seen.dart'; +import 'package:bluesky_poptart/app/bsky/richtext/facet.dart'; +import 'package:bluesky_poptart/app/bsky/unspecced/get_popular_feed_generators.dart'; +import 'package:bluesky_poptart/app/bsky/unspecced/get_trending_topics.dart'; +import 'package:bluesky_poptart/app/bsky/unspecced/get_trends.dart'; +import 'package:bluesky_poptart/app/bsky/video/defs.dart'; +import 'package:bluesky_poptart/app/bsky/video/get_job_status.dart'; +import 'package:bluesky_poptart/app/bsky/video/get_upload_limits.dart'; +import 'package:bluesky_poptart/app/bsky/video/upload_video.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/defs.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/delete_message_for_self.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/get_convo_for_members.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/get_messages.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/list_convos.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/mute_convo.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/send_message.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/unmute_convo.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/update_read.dart'; import 'package:poptart_lex/com/atproto/identity/resolve_handle.dart'; import 'package:poptart_lex/com/atproto/moderation/create_report.dart'; import 'package:poptart_lex/com/atproto/moderation/defs.dart'; diff --git a/lib/core/scheduler/post_scheduler.dart b/lib/core/scheduler/post_scheduler.dart --- a/lib/core/scheduler/post_scheduler.dart +++ b/lib/core/scheduler/post_scheduler.dart @@ -2,12 +2,12 @@ import 'dart:typed_data'; import 'package:poptart_core/poptart_core.dart' show AtUri, Blob; -import 'package:poptart_lex/app/bsky/embed/defs.dart' as embed_defs; -import 'package:poptart_lex/app/bsky/embed/images.dart'; -import 'package:poptart_lex/app/bsky/embed/video.dart'; -import 'package:poptart_lex/app/bsky/feed/post.dart'; -import 'package:poptart_lex/app/bsky/richtext/facet.dart'; -import 'package:poptart_lex/app/bsky/video/defs.dart'; +import 'package:bluesky_poptart/app/bsky/embed/defs.dart' as embed_defs; +import 'package:bluesky_poptart/app/bsky/embed/images.dart'; +import 'package:bluesky_poptart/app/bsky/embed/video.dart'; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; +import 'package:bluesky_poptart/app/bsky/richtext/facet.dart'; +import 'package:bluesky_poptart/app/bsky/video/defs.dart'; import 'package:poptart_lex/com/atproto/repo/strong_ref.dart'; import 'package:poptart_bluesky_text/poptart_bluesky_text.dart'; import 'package:flutter/widgets.dart'; diff --git a/lib/shared/utils/format_utils.dart b/lib/shared/utils/format_utils.dart --- a/lib/shared/utils/format_utils.dart +++ b/lib/shared/utils/format_utils.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:intl/intl.dart'; /// Returns up to two initials from a display value. diff --git a/lib/shared/utils/parse_utils.dart b/lib/shared/utils/parse_utils.dart --- a/lib/shared/utils/parse_utils.dart +++ b/lib/shared/utils/parse_utils.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/feed/post.dart'; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; FeedPostRecord? tryParseRecord(Map record) { try { diff --git a/test/core/cache/poptart_cache_codecs_test.dart b/test/core/cache/poptart_cache_codecs_test.dart --- a/test/core/cache/poptart_cache_codecs_test.dart +++ b/test/core/cache/poptart_cache_codecs_test.dart @@ -1,6 +1,6 @@ import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:lazurite/core/cache/poptart_cache_codecs.dart'; diff --git a/test/core/network/poptart_client_adapter_test.dart b/test/core/network/poptart_client_adapter_test.dart --- a/test/core/network/poptart_client_adapter_test.dart +++ b/test/core/network/poptart_client_adapter_test.dart @@ -3,10 +3,10 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:http/http.dart' as http; import 'package:lazurite/core/network/poptart_client_adapter.dart'; -import 'package:poptart_lex/app/bsky/actor.dart' as actor_methods; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed.dart' as feed_methods; -import 'package:poptart_lex/app/bsky/feed/post.dart'; +import 'package:bluesky_poptart/app/bsky/actor.dart' as actor_methods; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed.dart' as feed_methods; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; import 'package:poptart_lex/com/atproto/repo/apply_writes.dart'; import 'package:poptart_lex/com/atproto/repo/strong_ref.dart'; diff --git a/test/core/router/app_router_test.dart b/test/core/router/app_router_test.dart --- a/test/core/router/app_router_test.dart +++ b/test/core/router/app_router_test.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:bloc_test/bloc_test.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/shared/utils/format_utils_test.dart b/test/shared/utils/format_utils_test.dart --- a/test/shared/utils/format_utils_test.dart +++ b/test/shared/utils/format_utils_test.dart @@ -1,8 +1,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart'; import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:lazurite/shared/utils/format_utils.dart'; void main() { diff --git a/lib/features/alerts/presentation/alerts_screen.dart b/lib/features/alerts/presentation/alerts_screen.dart --- a/lib/features/alerts/presentation/alerts_screen.dart +++ b/lib/features/alerts/presentation/alerts_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:poptart_lex/chat/bsky/convo/defs.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/defs.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:lazurite/core/l10n/l10n.dart'; diff --git a/lib/features/compose/bloc/compose_bloc.dart b/lib/features/compose/bloc/compose_bloc.dart --- a/lib/features/compose/bloc/compose_bloc.dart +++ b/lib/features/compose/bloc/compose_bloc.dart @@ -2,15 +2,15 @@ import 'dart:io'; import 'dart:ui' as ui; -import 'package:poptart_lex/app/bsky/embed/defs.dart' as embed_defs; -import 'package:poptart_lex/app/bsky/embed/external.dart'; -import 'package:poptart_lex/app/bsky/embed/images.dart'; -import 'package:poptart_lex/app/bsky/embed/record.dart'; -import 'package:poptart_lex/app/bsky/embed/record_with_media.dart'; -import 'package:poptart_lex/app/bsky/embed/video.dart'; -import 'package:poptart_lex/app/bsky/feed/post.dart'; -import 'package:poptart_lex/app/bsky/richtext/facet.dart'; -import 'package:poptart_lex/app/bsky/video/defs.dart'; +import 'package:bluesky_poptart/app/bsky/embed/defs.dart' as embed_defs; +import 'package:bluesky_poptart/app/bsky/embed/external.dart'; +import 'package:bluesky_poptart/app/bsky/embed/images.dart'; +import 'package:bluesky_poptart/app/bsky/embed/record.dart'; +import 'package:bluesky_poptart/app/bsky/embed/record_with_media.dart'; +import 'package:bluesky_poptart/app/bsky/embed/video.dart'; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; +import 'package:bluesky_poptart/app/bsky/richtext/facet.dart'; +import 'package:bluesky_poptart/app/bsky/video/defs.dart'; import 'package:poptart_lex/com/atproto/repo/get_record.dart'; import 'package:poptart_lex/com/atproto/repo/strong_ref.dart'; import 'package:poptart_bluesky_text/poptart_bluesky_text.dart'; diff --git a/lib/features/devtools/cubit/dev_tools_cubit.dart b/lib/features/devtools/cubit/dev_tools_cubit.dart --- a/lib/features/devtools/cubit/dev_tools_cubit.dart +++ b/lib/features/devtools/cubit/dev_tools_cubit.dart @@ -6,8 +6,8 @@ import 'package:lazurite/core/network/actor_repository_service_resolver.dart'; import 'package:lazurite/core/network/atproto_host_resolver.dart'; import 'package:lazurite/core/network/poptart_client_adapter.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/actor/search_actors_typeahead.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/search_actors_typeahead.dart'; import 'package:poptart_lex/com/atproto/identity/resolve_handle.dart'; import 'package:poptart_lex/com/atproto/repo/describe_repo.dart'; import 'package:poptart_lex/com/atproto/repo/get_record.dart'; diff --git a/lib/features/devtools/presentation/dev_tools_screen.dart b/lib/features/devtools/presentation/dev_tools_screen.dart --- a/lib/features/devtools/presentation/dev_tools_screen.dart +++ b/lib/features/devtools/presentation/dev_tools_screen.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:poptart_lex/com/atproto/repo/list_records.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/feed/bloc/feed_bloc.dart b/lib/features/feed/bloc/feed_bloc.dart --- a/lib/features/feed/bloc/feed_bloc.dart +++ b/lib/features/feed/bloc/feed_bloc.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/feed/data/feed_repository.dart'; diff --git a/lib/features/feed/cubit/feed_preferences_cubit.dart b/lib/features/feed/cubit/feed_preferences_cubit.dart --- a/lib/features/feed/cubit/feed_preferences_cubit.dart +++ b/lib/features/feed/cubit/feed_preferences_cubit.dart @@ -1,6 +1,6 @@ import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:drift/drift.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/feed/cubit/post_thread_cubit.dart b/lib/features/feed/cubit/post_thread_cubit.dart --- a/lib/features/feed/cubit/post_thread_cubit.dart +++ b/lib/features/feed/cubit/post_thread_cubit.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/core/logging/app_logger.dart'; diff --git a/lib/features/feed/cubit/saved_posts_cubit.dart b/lib/features/feed/cubit/saved_posts_cubit.dart --- a/lib/features/feed/cubit/saved_posts_cubit.dart +++ b/lib/features/feed/cubit/saved_posts_cubit.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/bookmark/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/bookmark/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:drift/drift.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/feed/data/feed_repository.dart b/lib/features/feed/data/feed_repository.dart --- a/lib/features/feed/data/feed_repository.dart +++ b/lib/features/feed/data/feed_repository.dart @@ -1,8 +1,8 @@ import 'package:poptart_core/poptart_core.dart' as atcore show AtUri; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/get_author_feed.dart'; -import 'package:poptart_lex/app/bsky/unspecced/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_author_feed.dart'; +import 'package:bluesky_poptart/app/bsky/unspecced/defs.dart'; import 'package:flutter/foundation.dart'; import 'package:lazurite/core/cache/poptart_cache_codecs.dart'; import 'package:lazurite/core/cache/offline_cache_policy.dart'; diff --git a/lib/features/feed/data/liked_posts_repository.dart b/lib/features/feed/data/liked_posts_repository.dart --- a/lib/features/feed/data/liked_posts_repository.dart +++ b/lib/features/feed/data/liked_posts_repository.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:drift/drift.dart' show Value; import 'package:lazurite/core/cache/poptart_cache_codecs.dart'; import 'package:lazurite/core/database/app_database.dart'; diff --git a/lib/features/feed/data/post_action_repository.dart b/lib/features/feed/data/post_action_repository.dart --- a/lib/features/feed/data/post_action_repository.dart +++ b/lib/features/feed/data/post_action_repository.dart @@ -1,8 +1,8 @@ import 'package:poptart_lex/com/atproto/repo/strong_ref.dart'; -import 'package:poptart_lex/app/bsky/bookmark/get_bookmarks.dart'; -import 'package:poptart_lex/app/bsky/feed/get_likes.dart'; -import 'package:poptart_lex/app/bsky/feed/get_quotes.dart'; -import 'package:poptart_lex/app/bsky/feed/get_reposted_by.dart'; +import 'package:bluesky_poptart/app/bsky/bookmark/get_bookmarks.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_likes.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_quotes.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_reposted_by.dart'; import 'package:lazurite/core/network/poptart_client_adapter.dart'; import 'package:lazurite/core/network/app_view_request_context.dart'; diff --git a/lib/features/feed/data/post_thread_repository.dart b/lib/features/feed/data/post_thread_repository.dart --- a/lib/features/feed/data/post_thread_repository.dart +++ b/lib/features/feed/data/post_thread_repository.dart @@ -1,6 +1,6 @@ import 'package:poptart_core/poptart_core.dart' as atcore; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/get_post_thread.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/get_post_thread.dart'; import 'package:lazurite/core/cache/poptart_cache_codecs.dart'; import 'package:lazurite/core/cache/offline_cache_policy.dart'; import 'package:lazurite/core/database/app_database.dart'; diff --git a/lib/features/feed/data/trending_join.dart b/lib/features/feed/data/trending_join.dart --- a/lib/features/feed/data/trending_join.dart +++ b/lib/features/feed/data/trending_join.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/unspecced/defs.dart'; +import 'package:bluesky_poptart/app/bsky/unspecced/defs.dart'; class EnrichedTrendingTopic { const EnrichedTrendingTopic({required this.topic, this.trend}); diff --git a/lib/features/feed/presentation/feed_detail_screen.dart b/lib/features/feed/presentation/feed_detail_screen.dart --- a/lib/features/feed/presentation/feed_detail_screen.dart +++ b/lib/features/feed/presentation/feed_detail_screen.dart @@ -1,5 +1,5 @@ import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/auth/bloc/auth_bloc.dart'; diff --git a/lib/features/feed/presentation/feed_management_screen.dart b/lib/features/feed/presentation/feed_management_screen.dart --- a/lib/features/feed/presentation/feed_management_screen.dart +++ b/lib/features/feed/presentation/feed_management_screen.dart @@ -1,5 +1,5 @@ -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/feed/presentation/home_feed_screen.dart b/lib/features/feed/presentation/home_feed_screen.dart --- a/lib/features/feed/presentation/home_feed_screen.dart +++ b/lib/features/feed/presentation/home_feed_screen.dart @@ -1,6 +1,6 @@ import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/feed/presentation/post_thread_screen.dart b/lib/features/feed/presentation/post_thread_screen.dart --- a/lib/features/feed/presentation/post_thread_screen.dart +++ b/lib/features/feed/presentation/post_thread_screen.dart @@ -1,8 +1,8 @@ import 'dart:async'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/post.dart'; -import 'package:poptart_bluesky_moderation/poptart_bluesky_moderation.dart' as bsky_moderation; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/post.dart'; +import 'package:lazurite/features/moderation/domain/moderation_models.dart' as bsky_moderation; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; diff --git a/lib/features/feed/presentation/saved_posts_screen.dart b/lib/features/feed/presentation/saved_posts_screen.dart --- a/lib/features/feed/presentation/saved_posts_screen.dart +++ b/lib/features/feed/presentation/saved_posts_screen.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; diff --git a/lib/features/lists/bloc/list_bloc.dart b/lib/features/lists/bloc/list_bloc.dart --- a/lib/features/lists/bloc/list_bloc.dart +++ b/lib/features/lists/bloc/list_bloc.dart @@ -1,5 +1,5 @@ import 'package:poptart_core/poptart_core.dart' show AtUri, Blob; -import 'package:poptart_lex/app/bsky/graph/defs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/lists/data/list_repository.dart'; diff --git a/lib/features/lists/bloc/list_feed_bloc.dart b/lib/features/lists/bloc/list_feed_bloc.dart --- a/lib/features/lists/bloc/list_feed_bloc.dart +++ b/lib/features/lists/bloc/list_feed_bloc.dart @@ -1,5 +1,5 @@ import 'package:poptart_core/poptart_core.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/lists/data/list_repository.dart'; diff --git a/lib/features/lists/cubit/add_to_list_cubit.dart b/lib/features/lists/cubit/add_to_list_cubit.dart --- a/lib/features/lists/cubit/add_to_list_cubit.dart +++ b/lib/features/lists/cubit/add_to_list_cubit.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/graph/get_lists_with_membership.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_lists_with_membership.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/lists/data/list_repository.dart'; diff --git a/lib/features/lists/cubit/my_lists_cubit.dart b/lib/features/lists/cubit/my_lists_cubit.dart --- a/lib/features/lists/cubit/my_lists_cubit.dart +++ b/lib/features/lists/cubit/my_lists_cubit.dart @@ -1,5 +1,5 @@ import 'package:poptart_core/poptart_core.dart' show AtUri, Blob; -import 'package:poptart_lex/app/bsky/graph/defs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/features/lists/data/list_repository.dart'; diff --git a/lib/features/lists/data/list_repository.dart b/lib/features/lists/data/list_repository.dart --- a/lib/features/lists/data/list_repository.dart +++ b/lib/features/lists/data/list_repository.dart @@ -1,11 +1,11 @@ import 'dart:typed_data'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/graph/defs.dart'; -import 'package:poptart_lex/app/bsky/graph/get_lists.dart'; -import 'package:poptart_lex/app/bsky/graph/get_lists_with_membership.dart'; -import 'package:poptart_lex/app/bsky/graph/list.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_lists.dart'; +import 'package:bluesky_poptart/app/bsky/graph/get_lists_with_membership.dart'; +import 'package:bluesky_poptart/app/bsky/graph/list.dart'; import 'package:lazurite/core/network/app_view_request_context.dart'; import 'package:lazurite/core/network/poptart_client_adapter.dart'; import 'package:lazurite/features/moderation/data/moderation_service.dart'; diff --git a/lib/features/lists/presentation/list_detail_screen.dart b/lib/features/lists/presentation/list_detail_screen.dart --- a/lib/features/lists/presentation/list_detail_screen.dart +++ b/lib/features/lists/presentation/list_detail_screen.dart @@ -1,6 +1,6 @@ import 'package:poptart_core/poptart_core.dart' show AtUri; -import 'package:poptart_lex/app/bsky/graph/defs.dart' as bsky_graph; -import 'package:poptart_bluesky_moderation/poptart_bluesky_moderation.dart' as bsky_moderation; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart' as bsky_graph; +import 'package:lazurite/features/moderation/domain/moderation_models.dart' as bsky_moderation; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; diff --git a/lib/features/lists/presentation/list_members_screen.dart b/lib/features/lists/presentation/list_members_screen.dart --- a/lib/features/lists/presentation/list_members_screen.dart +++ b/lib/features/lists/presentation/list_members_screen.dart @@ -1,5 +1,5 @@ import 'package:poptart_core/poptart_core.dart' show AtUri; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/core/l10n/l10n.dart'; diff --git a/lib/features/lists/presentation/my_lists_screen.dart b/lib/features/lists/presentation/my_lists_screen.dart --- a/lib/features/lists/presentation/my_lists_screen.dart +++ b/lib/features/lists/presentation/my_lists_screen.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/app/bsky/graph/defs.dart' as bsky_graph; +import 'package:bluesky_poptart/app/bsky/graph/defs.dart' as bsky_graph; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/messages/bloc/convo_list_bloc.dart b/lib/features/messages/bloc/convo_list_bloc.dart --- a/lib/features/messages/bloc/convo_list_bloc.dart +++ b/lib/features/messages/bloc/convo_list_bloc.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/chat/bsky/convo/defs.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/defs.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/core/logging/app_logger.dart'; diff --git a/lib/features/messages/bloc/message_bloc.dart b/lib/features/messages/bloc/message_bloc.dart --- a/lib/features/messages/bloc/message_bloc.dart +++ b/lib/features/messages/bloc/message_bloc.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/chat/bsky/convo/get_messages.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/get_messages.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lazurite/core/logging/app_logger.dart'; diff --git a/lib/features/messages/data/convo_repository.dart b/lib/features/messages/data/convo_repository.dart --- a/lib/features/messages/data/convo_repository.dart +++ b/lib/features/messages/data/convo_repository.dart @@ -1,6 +1,6 @@ import 'package:lazurite/core/network/poptart_client_adapter.dart'; -import 'package:poptart_lex/chat/bsky/convo/defs.dart'; -import 'package:poptart_lex/chat/bsky/convo/get_messages.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/defs.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/get_messages.dart'; import 'package:lazurite/core/network/unauthorized_recovery_runner.dart'; import 'package:lazurite/core/network/xrpc_client_factory.dart'; import 'package:lazurite/features/auth/data/models/auth_models.dart'; diff --git a/lib/features/messages/presentation/message_thread_screen.dart b/lib/features/messages/presentation/message_thread_screen.dart --- a/lib/features/messages/presentation/message_thread_screen.dart +++ b/lib/features/messages/presentation/message_thread_screen.dart @@ -1,4 +1,4 @@ -import 'package:poptart_lex/chat/bsky/convo/get_messages.dart'; +import 'package:bluesky_poptart/chat/bsky/convo/get_messages.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/features/moderation/data/moderation_service.dart b/lib/features/moderation/data/moderation_service.dart --- a/lib/features/moderation/data/moderation_service.dart +++ b/lib/features/moderation/data/moderation_service.dart @@ -1,17 +1,17 @@ import 'dart:async'; -import 'package:poptart_lex/com/atproto/label/defs.dart'; -import 'package:poptart_lex/app/bsky/actor/defs.dart'; -import 'package:poptart_lex/app/bsky/actor/get_preferences.dart'; -import 'package:poptart_lex/app/bsky/feed/defs.dart'; -import 'package:poptart_lex/app/bsky/labeler/defs.dart'; -import 'package:poptart_lex/app/bsky/labeler/get_services.dart'; -import 'package:poptart_lex/app/bsky/notification/list_notifications.dart' as notifications; -import 'package:poptart_bluesky_moderation/poptart_bluesky_moderation.dart' as bsky_moderation; + +import 'package:bluesky_poptart/app/bsky/actor/defs.dart'; +import 'package:bluesky_poptart/app/bsky/feed/defs.dart'; +import 'package:bluesky_poptart/app/bsky/labeler/defs.dart'; +import 'package:bluesky_poptart/app/bsky/labeler/get_services.dart'; +import 'package:bluesky_poptart/app/bsky/notification/list_notifications.dart' as notifications; import 'package:lazurite/core/cache/poptart_cache_codecs.dart'; import 'package:lazurite/core/database/app_database.dart'; import 'package:lazurite/core/logging/app_logger.dart'; import 'package:lazurite/core/network/app_view_request_context.dart'; import 'package:lazurite/core/network/poptart_client_adapter.dart'; +import 'package:lazurite/features/moderation/domain/moderation_models.dart' as moderation; +import 'package:poptart_lex/com/atproto/label/defs.dart'; const _officialBlueskyLabelerDid = 'did:plc:ar7c4by46qjdydhdevvrndac'; const _maxCustomLabelers = 20; @@ -44,17 +44,17 @@ final String? _userDid; final AppViewRequestContext _appViewContext; - bsky_moderation.ModerationOpts? _opts; + moderation.ModerationOpts? _opts; List _preferences = const []; late Map _headers; Future? _initializationFuture; bool _disposed = false; - final _optsController = StreamController.broadcast(); + final _optsController = StreamController.broadcast(); final Map _labelerPoliciesByDid = {}; - Stream get optsStream => _optsController.stream; - bsky_moderation.ModerationOpts? get currentOpts => _opts; - bsky_moderation.ModerationPrefs? get currentPrefs => _opts?.prefs; + Stream get optsStream => _optsController.stream; + moderation.ModerationOpts? get currentOpts => _opts; + moderation.ModerationPrefs? get currentPrefs => _opts?.prefs; List get currentPreferences => List.unmodifiable(_preferences); Map get currentHeaders => Map.unmodifiable(_headers); @@ -185,81 +185,170 @@ await _putAndRefresh(updated); } - bsky_moderation.ModerationDecision moderateFeedViewPost(FeedViewPost post) => moderatePost(post.post); + moderation.ModerationDecision moderateFeedViewPost(FeedViewPost post) => moderatePost(post.post); - bsky_moderation.ModerationDecision moderatePost(PostView post) { + moderation.ModerationDecision moderatePost(PostView post) { final opts = _opts; if (opts == null) { - return bsky_moderation.ModerationDecision.merge(const []); + return const moderation.ModerationDecision.empty(); } - return bsky_moderation.moderatePost(bsky_moderation.ModerationSubjectPost.postView(data: post), opts); - } - - bsky_moderation.ModerationDecision moderateProfile(ProfileView profile) { - final opts = _opts; - if (opts == null) { - return bsky_moderation.ModerationDecision.merge(const []); - } - - return bsky_moderation.moderateProfile(bsky_moderation.ModerationSubjectProfile.profileView(data: profile), opts); - } - - bsky_moderation.ModerationDecision moderateProfileBasic(ProfileViewBasic profile) { - final opts = _opts; - if (opts == null) { - return bsky_moderation.ModerationDecision.merge(const []); - } - - return bsky_moderation.moderateProfile( - bsky_moderation.ModerationSubjectProfile.profileViewBasic(data: profile), - opts, + return moderation.ModerationDecision( + me: post.author.did == _resolvedUserDid, + causes: [ + if (opts.prefs.hiddenPosts.contains(post.uri.toString())) _hiddenCause(), + ..._viewerCauses(post.author.viewer), + ..._labelCauses(post.labels ?? const [], moderation.LabelTarget.content, opts), + ..._labelCauses(post.author.labels ?? const [], moderation.LabelTarget.account, opts), + ], ); } - bsky_moderation.ModerationDecision moderateProfileDetailed(ProfileViewDetailed profile) { + moderation.ModerationDecision moderateProfile(ProfileView profile) { final opts = _opts; if (opts == null) { - return bsky_moderation.ModerationDecision.merge(const []); + return const moderation.ModerationDecision.empty(); } - return bsky_moderation.moderateProfile( - bsky_moderation.ModerationSubjectProfile.profileViewDetailed(data: profile), - opts, + return _moderateActor(did: profile.did, viewer: profile.viewer, labels: profile.labels ?? const [], opts: opts); + } + + moderation.ModerationDecision moderateProfileBasic(ProfileViewBasic profile) { + final opts = _opts; + if (opts == null) { + return const moderation.ModerationDecision.empty(); + } + + return _moderateActor(did: profile.did, viewer: profile.viewer, labels: profile.labels ?? const [], opts: opts); + } + + moderation.ModerationDecision moderateProfileDetailed(ProfileViewDetailed profile) { + final opts = _opts; + if (opts == null) { + return const moderation.ModerationDecision.empty(); + } + + return _moderateActor(did: profile.did, viewer: profile.viewer, labels: profile.labels ?? const [], opts: opts); + } + + moderation.ModerationDecision moderateNotification(notifications.Notification notification) { + final opts = _opts; + if (opts == null) { + return const moderation.ModerationDecision.empty(); + } + + return moderation.ModerationDecision.merge([ + _moderateActor( + did: notification.author.did, + viewer: notification.author.viewer, + labels: notification.author.labels ?? const [], + opts: opts, + ), + moderation.ModerationDecision( + me: notification.author.did == _resolvedUserDid, + causes: _labelCauses(notification.labels ?? const [], moderation.LabelTarget.content, opts), + ), + ]); + } + + moderation.ModerationDecision _moderateActor({ + required String did, + required dynamic viewer, + required List