Skip to content

Conversation

@iloveuhyeon
Copy link
Collaborator

πŸ’‘ κ°œμš”

  • Bankrupcty λͺ¨λ‹¬ 퍼블리싱 밎 κΈ°λŠ₯κ΅¬ν˜„

πŸ“ƒ μž‘μ—…λ‚΄μš©

Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-05-29.at.16.14.35.mp4

πŸ™‹β€β™‚οΈ μ§ˆλ¬Έμ‚¬ν•­

  • κ°œμ„ ν•  점, μ˜€νƒ€, μ½”λ“œμ— μ΄μƒν•œ 뢀뢄이 μžˆλ‹€λ©΄ Comment λ‹¬μ•„μ£Όμ„Έμš”.

🍴 μ‚¬μš©λ°©λ²•

@iloveuhyeon iloveuhyeon self-assigned this May 29, 2025
@iloveuhyeon iloveuhyeon added the enhancement New feature or request label May 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a bankruptcy modal to inform users of their gambling loss status, persists their β€œdon’t show again” choice, and integrates the new API into the Home screen flow.

  • Introduces BankruptcyModal widget with UI and checkbox logic
  • Hooks modal display into HomeScreen via BlocConsumer and adds isBankruptcy handling
  • Extends BLoC (HomeState, HomeEvent, HomeBloc) for fetching/storing bankruptcy status
  • Adds getWastedMe API, models, repository, and data source implementations

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart New modal UI with β€œdon’t show again” checkbox
lib/presentation/home/screen/home_screen.dart Uses BlocConsumer to show the modal once and dispatches check event
lib/presentation/home/bloc/home_state.dart
home_event.dart
home_bloc.dart
Added isBankruptcy, CheckBankruptcy event, and persistence logic
lib/data/models/stage/search_stage/search_wasted_me_response.dart
stage_repository*.dart
Added SearchWastedMeResponse and getWastedMe support
lib/design_system/component/stage/gogo_stage_card_component.dart Minor navigation call update
Comments suppressed due to low confidence (3)

lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart:22

  • [nitpick] The method name checkingBox is ambiguous; consider renaming it to something more descriptive like toggleCheckbox or onCheckboxTapped.
checkingBox() {

lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart:57

  • The Korean text contains duplicated words (μž‘μ„±ν•˜κ³  ν•˜κ³  and μ œμΆœν•¨μ— 제좜). Please correct the typos for clarity.
β€˜

Team. GOGOλŠ” μ²­μ†Œλ…„ λΆˆλ²• 도박 근절 캠페인과 ν•¨κ»˜,  ν•œ 번의 기회둜 κ±΄κ°•ν•œ 리셋을 μ œκ³΅ν•©λ‹ˆλ‹€.

2μΈ΅ ν™ˆλ² μ΄μŠ€μ— λΉ„μΉ˜λ˜μ–΄μžˆλŠ” μ„œμ•½μ„œλ₯Ό μž‘μ„±ν•˜κ³  ν•˜κ³  μ œμΆœν•¨μ— μ œμΆœν•˜λ©΄ ν•œ 번의 기회둜 포인트λ₯Ό 지원받을 수 μžˆμŠ΅λ‹ˆλ‹€. (전체 포인트의 평균, μ΅œμ†Œ 3만, μ΅œλŒ€ 5만)

κ·ΈλŸ¬λ‚˜ λ‹€μ‹œλŠ” 같은 μ‹€μˆ˜λ₯Ό λ°˜λ³΅ν•˜μ§€ λ§ˆμ„Έμš”.

lib/data/repositories/stage/stage_repository.dart:83

  • New repository and API methods for getWastedMe have been added but lack corresponding unit tests; consider adding tests for the repository, data source, and bloc logic.
Future<SearchWastedMeResponse> getWastedMe(int stageId);

child: BlocConsumer<HomeBloc, HomeState>(
listener: (BuildContext context, HomeState state) async {
if (state is LoadedHomeState) {
print(state.isBankruptcy);
Copy link

Copilot AI May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the print statement or replace it with a proper logging mechanism; debug prints should not remain in production code.

Suggested change
print(state.isBankruptcy);
log('Bankruptcy status: ${state.isBankruptcy}', name: 'HomeScreen');

Copilot uses AI. Check for mistakes.
class LoadingHomeState extends HomeState {}

class LoadedHomeState extends HomeState {
bool isBankruptcy = false;
Copy link

Copilot AI May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bloc state fields should be immutable. Consider declaring isBankruptcy as a final property and initializing it via the constructor.

Suggested change
bool isBankruptcy = false;
final bool isBankruptcy;

Copilot uses AI. Check for mistakes.
@iloveuhyeon iloveuhyeon merged commit 3e3878b into develop May 29, 2025
1 check passed
@iloveuhyeon iloveuhyeon deleted the feature/#173-publishing-bankruptcy-modak branch May 29, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

νŒŒμ‚° λͺ¨λ‹¬ 퍼블리싱 및 κΈ°λŠ₯κ΅¬ν˜„

4 participants