Skip to content

Conversation

@JinUng41
Copy link
Collaborator

@JinUng41 JinUng41 commented Jun 18, 2025

👻 PULL REQUEST

📄 작업 내용

  • 커뮤니티 사전 신청을 완료한 유저라도, 앱 최초 실행 시 커뮤니티 탭 초기 신청 화면이 보이는 문제를 해결하였습니다.
  • 뷰모델, 뷰컨트롤러의 로직을 수정하였습니다.

💻 주요 코드 설명

커뮤니티 탭의 오류 해결

  • 기존 코드는 실행 요청은 순차로 이뤄질 수 있었으나, 결과 반환에서 순서가 보장되지 않았습니다.
  • 사전 신청 여부보다 커뮤니티 목록이 먼저 반환되어 초기 신청 화면이 보였던 원인을 발견하였습니다.
  • 확실하게 먼저 사전 신청 여부의 반환을 하고, 커뮤니티 목록을 받아오도록 순서를 보장하였습니다.

👀 기타 더 이야기해볼 점

  • 아직 팀별 색상이 최신화가 되어 있지 않아, Figma에 댓글을 남겨 요청해 두었습니다. 최신화가 완료되는대로 같이 반영하여, 머지하겠습니다.

🔗 연결된 이슈

Summary by CodeRabbit

  • Refactor
    • Streamlined event handling and state management in the Community screens by adopting Combine's native publishers and subjects.
    • Simplified UI event bindings and removed redundant properties for a cleaner, more maintainable codebase.
    • Updated the Community view to expose refresh and button tap events as publishers, improving reactive programming support.
    • Improved naming consistency and merged refresh triggers for a more intuitive user experience.
    • Replaced CommunityUseCase with CommunityRepository for dependency injection, enhancing modularity.
    • Simplified CommunityViewModel logic and improved reactive streams for loading and registration flows.
    • Renamed repository methods for clarity and added a mock repository for testing.
    • Removed obsolete CommunityUseCase files and project references.
    • Simplified dependency injection syntax and added registration for CommunityRepository.
    • Simplified CommunityViewController event handling by replacing custom relays with Combine subjects.
  • Style
    • Updated ask button title to use a shared string resource for consistency across the app.

@JinUng41 JinUng41 requested a review from youz2me June 18, 2025 06:25
@JinUng41 JinUng41 self-assigned this Jun 18, 2025
@JinUng41 JinUng41 added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🍻 진웅 술 한잔 가온나~ labels Jun 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change refactors the community feature's reactive bindings from custom relays to Combine's subjects and publishers, reorganizes view and view model state management, and streamlines UI event handling. It also ensures that the community registration state is accurately reflected on the initial app launch, addressing an initialization issue.

Changes

File(s) Change Summary
.../Domain/UseCase/Community/CommunityUseCase.swift Removed CommunityUseCase protocol and its implementations (CommunityUseCaseImpl, MockCommunityUseCaseImpl); updated mock register(for:) return value from 0.92 to 88.0.
.../Data/RepositoryImpl/CommunityRepositoryImpl.swift, .../Domain/RepositoryInterface/CommunityRepository.swift Renamed methods: updateRegisterupdateRegistration, isUserRegisteredcheckUserRegistration; added MockCommunityRepository with mock implementations returning delayed publishers with fixed data.
.../Presentation/Community/View/CommunityViewController.swift Replaced custom relays with Combine PassthroughSubjects; removed redundant computed properties and relays; replaced target-action with Combine subscriptions; updated refresh handling; simplified scroll-to-top logic; updated event sending to use new subjects.
.../Presentation/Community/View/Subview/CommunityView.swift Promoted UI components to private properties; extracted refreshControl as a property; updated ask button title to use string literal; added Combine publishers for ask button tap and refresh events; removed local constants; reorganized layout code.
.../Presentation/Community/ViewModel/CommunityViewModel.swift Replaced injected CommunityUseCase with injected CommunityRepository; replaced relays with CurrentValueSubjects; merged initial load and refresh logic; added dedicated binding methods; improved state management to reflect initial user registration; renamed outputs; improved error handling and item mapping.
.../App/AppDelegate+InjectDependency.swift Added dependency registration for CommunityRepository with .mock and .production cases; simplified switch syntax.
.../Presentation/TabBar/TabBarController.swift Simplified communityViewController initialization by removing explicit dependency injection of CommunityUseCaseImpl and CommunityRepositoryImpl; now uses default CommunityViewModel initializer.
.../Wable-iOS.xcodeproj/project.pbxproj Removed all references to CommunityUseCase.swift file and its group from the Xcode project file.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CommunityView
    participant CommunityViewController
    participant CommunityViewModel
    participant CommunityRepository

    User->>CommunityView: Tap Ask Button / Pull to Refresh
    CommunityView->>CommunityViewController: askDidTap / didRefresh (Publisher)
    CommunityViewController->>CommunityViewModel: registerSubject.send / refreshSubject.send
    CommunityViewModel->>CommunityRepository: checkUserRegistration (initial load)
    CommunityRepository-->>CommunityViewModel: UserRegistrationState
    CommunityViewModel->>CommunityRepository: fetchCommunityList
    CommunityRepository-->>CommunityViewModel: [Community]
    CommunityViewModel-->>CommunityViewController: communityItems (Publisher)
    CommunityViewController->>CommunityView: Update UI
Loading

Assessment against linked issues

Objective Addressed Explanation
Fix: Ensure that after initial app launch, the community tab correctly reflects registration state, even for users who have already registered. (#233)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related PRs

Poem

A hop and a jump through Combine we go,
From relays to subjects, the bindings now flow.
The community's state, at launch, is just right—
No more confusion in morning or night!
With a wiggle of whiskers and a satisfied cheer,
This bunny says: "Community bugs, disappear!" 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc6f63 and 4b18f7c.

📒 Files selected for processing (1)
  • Wable-iOS.xcodeproj/project.pbxproj (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift (1)

95-101: Consider thread safety for subject updates

While the current implementation should work correctly on the main thread, consider using receive(on:) operator before updating the communityListSubject to ensure thread safety.

            .sink { [weak self] team, updatedRate in
                guard let index = self?.communityListSubject.value.firstIndex(where: { $0.team == team }) else {
                    return WableLogger.log("팀을 찾을 수 없습니다.", for: .debug)
                }
                
-                self?.communityListSubject.value[index].registrationRate = updatedRate
+                var updatedList = self?.communityListSubject.value ?? []
+                updatedList[index].registrationRate = updatedRate
+                self?.communityListSubject.send(updatedList)
            }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45f1fd6 and 3ff0276.

📒 Files selected for processing (4)
  • Wable-iOS/Domain/UseCase/Community/CommunityUseCase.swift (1 hunks)
  • Wable-iOS/Presentation/Community/View/CommunityViewController.swift (8 hunks)
  • Wable-iOS/Presentation/Community/View/Subview/CommunityView.swift (4 hunks)
  • Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift (3 hunks)
🔇 Additional comments (6)
Wable-iOS/Presentation/Community/View/Subview/CommunityView.swift (2)

8-8: Well-structured reactive refactoring

The promotion of UI components to properties and addition of Combine publishers properly exposes UI events for reactive bindings. This aligns well with the overall refactoring to use Combine's native publishers.

Also applies to: 18-21, 29-30, 39-39, 56-57


33-33: Good use of string literals

Using StringLiterals.Community.askButtonTitle instead of hardcoded strings improves maintainability and localization support.

Wable-iOS/Presentation/Community/View/CommunityViewController.swift (2)

35-36: Clean migration to Combine subjects

The refactoring from custom relays to Combine's native PassthroughSubject is well-implemented. The setupAction properly subscribes to the view's publishers and the input bindings are correctly updated.

Also applies to: 74-79, 152-154


254-255: Simplified scroll behavior

The direct use of setContentOffset is cleaner than the previous implementation.

Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift (2)

54-65: Correct sequencing fixes the initialization issue

The bindInitialLoad method correctly ensures that user registration status is fetched first before loading the community list. This sequential execution addresses the PR's main objective of fixing the issue where pre-registered users saw the initial application screen.


40-50: Well-structured reactive architecture

The refactoring with separated binding methods and publisher creation improves code organization and maintainability. The state management using CurrentValueSubject is more idiomatic for Combine.

Also applies to: 105-128

Comment on lines 66 to 67
func register(for communityTeam: LCKTeam) -> AnyPublisher<Double, WableError> {
return .just(0.92)
return .just(88.0)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Inconsistent value range with other mock data

The registration rate returned here (88.0) appears to be in a 0-100 range, while the registration rates in fetchCommunityList() are in a 0-1 range (e.g., 0.91, 0.88). This inconsistency could cause issues if consumers expect consistent value ranges.

Consider aligning the value ranges:

-        return .just(88.0)
+        return .just(0.88)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
func register(for communityTeam: LCKTeam) -> AnyPublisher<Double, WableError> {
return .just(0.92)
return .just(88.0)
func register(for communityTeam: LCKTeam) -> AnyPublisher<Double, WableError> {
return .just(0.88)
🤖 Prompt for AI Agents
In Wable-iOS/Domain/UseCase/Community/CommunityUseCase.swift at lines 66-67, the
mock registration rate returned is 88.0, which is inconsistent with the 0-1
range used in fetchCommunityList(). Change the returned value to a decimal
between 0 and 1, such as 0.88, to align with the other mock data and ensure
consistent value ranges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
Wable-iOS/Data/RepositoryImpl/CommunityRepositoryImpl.swift (1)

20-31: Name mismatch between API target and method

updateRegistration() still calls .updateRegister on CommunityTargetType.

.updateRegister( request: DTO.Request.UpdateRegister(...) )

If the server endpoint was renamed in parallel to the Swift API, update the target as well to avoid 404s.

-.updateRegister(
+.updateRegistration(
🧹 Nitpick comments (4)
Wable-iOS/App/AppDelegate+InjectDependency.swift (2)

81-88: Nit: unused env in several one-liner registrations

Throughout the file (GhostRepository, CommunityRepository, …) closures keep the env parameter even when it is ignored and a single implementation is returned.

Example:

diContainer.register(for: GhostRepository.self) { env in
    return GhostRepositoryImpl()
}

Dropping the parameter and using the sugar object: overload would remove noise.

-diContainer.register(for: GhostRepository.self) { env in
-    GhostRepositoryImpl()
-}
+diContainer.register(for: GhostRepository.self, object: GhostRepositoryImpl())

83-87: Consider wiring the mock registration under #if DEBUG only

Shipping MockCommunityRepository() in production by accident would silently bypass real network calls.
Guard the switch with #if DEBUG or remove .mock when not used to reduce attack surface.

Wable-iOS/Data/RepositoryImpl/CommunityRepositoryImpl.swift (1)

49-56: Combine helper .just is non-standard

Combine itself does not offer a top-level .just(_) helper; it lives in CombineExt.
If that dependency is ever removed, these calls will fail to compile. Safer:

return Just(88.0)
    .setFailureType(to: WableError.self)
    .delay(for: .seconds(randomDelay), scheduler: DispatchQueue.main)
    .eraseToAnyPublisher()
Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift (1)

128-136: Authorization check spawns a new UNUserNotificationCenter query per tap

getNotificationSettings is inexpensive but you can cache the result for the session:

private lazy var notificationAuthSubject = CurrentValueSubject<Bool, Never>(false)

UNUserNotificationCenter.current().getNotificationSettings { settings in
    notificationAuthSubject.send(settings.authorizationStatus == .authorized)
}

Then expose notificationAuthSubject.asDriver() instead of making a fresh call each time.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ff0276 and 6f80813.

📒 Files selected for processing (7)
  • Wable-iOS.xcodeproj/project.pbxproj (0 hunks)
  • Wable-iOS/App/AppDelegate+InjectDependency.swift (3 hunks)
  • Wable-iOS/Data/RepositoryImpl/CommunityRepositoryImpl.swift (2 hunks)
  • Wable-iOS/Domain/RepositoryInterface/CommunityRepository.swift (1 hunks)
  • Wable-iOS/Domain/UseCase/Community/CommunityUseCase.swift (0 hunks)
  • Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift (2 hunks)
  • Wable-iOS/Presentation/TabBar/TabBarController.swift (1 hunks)
💤 Files with no reviewable changes (2)
  • Wable-iOS.xcodeproj/project.pbxproj
  • Wable-iOS/Domain/UseCase/Community/CommunityUseCase.swift
✅ Files skipped from review due to trivial changes (1)
  • Wable-iOS/Domain/RepositoryInterface/CommunityRepository.swift
🔇 Additional comments (1)
Wable-iOS/Presentation/TabBar/TabBarController.swift (1)

45-47: Verify that DI registration resolves CommunityRepository at runtime

CommunityViewModel() now relies entirely on the @Injected property wrapper.
If the CommunityRepository registration is omitted or is registered after this VC is created (e.g. from a scene-specific container), the app will crash with a fatalError from the resolver.

Double-check that:

  1. AppDelegate.injectDependency() is executed before the TabBarController is constructed.
  2. The registration for .production env is the one selected at run time.

Otherwise keep the explicit viewModel: constructor that takes the repository for extra safety.

Comment on lines +75 to 78
.compactMap { [weak self] in self?.communityListSubject.value[$0].team }
.handleEvents(receiveOutput: { [weak self] team in
self?.userRegistrationState = CommunityRegistration(team: team, hasRegisteredTeam: true)
})
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

State mutated before network confirmation

userRegistrationState is set optimistically before updateRegistration succeeds.
If the request fails you will present an incorrect state until next app launch.

Move the assignment to the success branch:

.handleEvents(receiveOutput: { [weak self] _ in
    self?.registrationCompletedSubject.send(team)
    self?.userRegistrationState = CommunityRegistration(team: team, hasRegisteredTeam: true)
})
🤖 Prompt for AI Agents
In Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift around
lines 75 to 78, the userRegistrationState is being set optimistically before the
network request updateRegistration confirms success, which can cause incorrect
UI state if the request fails. To fix this, move the assignment of
userRegistrationState into the success branch of the network call, specifically
inside the handleEvents receiveOutput closure after confirming the update
succeeded, and also send the registrationCompletedSubject event there to ensure
state is only updated on successful registration.

Comment on lines +92 to 98
.sink { [weak self] team, updatedRate in
guard let index = self?.communityListSubject.value.firstIndex(where: { $0.team == team }) else {
return WableLogger.log("팀을 찾을 수 없습니다.", for: .debug)
}

communityListRelay.value[index].registrationRate = updatedRate
self?.communityListSubject.value[index].registrationRate = updatedRate
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Registration rate update is not published

CurrentValueSubject only notifies subscribers when you assign a new value.
Mutating an element inside the stored array does not emit, so the UI never sees the updated rate.

-self?.communityListSubject.value[index].registrationRate = updatedRate
+if var list = self?.communityListSubject.value {
+    list[index].registrationRate = updatedRate
+    self?.communityListSubject.send(list)   // emit new value
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.sink { [weak self] team, updatedRate in
guard let index = self?.communityListSubject.value.firstIndex(where: { $0.team == team }) else {
return WableLogger.log("팀을 찾을 수 없습니다.", for: .debug)
}
communityListRelay.value[index].registrationRate = updatedRate
self?.communityListSubject.value[index].registrationRate = updatedRate
}
.sink { [weak self] team, updatedRate in
guard let index = self?.communityListSubject.value.firstIndex(where: { $0.team == team }) else {
return WableLogger.log("팀을 찾을 수 없습니다.", for: .debug)
}
if var list = self?.communityListSubject.value {
list[index].registrationRate = updatedRate
self?.communityListSubject.send(list) // emit new value
}
}
🤖 Prompt for AI Agents
In Wable-iOS/Presentation/Community/ViewModel/CommunityViewModel.swift around
lines 92 to 98, the issue is that mutating an element inside the array held by
communityListSubject does not trigger a publish event. To fix this, after
updating the registrationRate on the element, reassign the entire array to
communityListSubject.value to emit the change and notify subscribers.

Copy link
Member

@youz2me youz2me left a comment

Choose a reason for hiding this comment

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

굿!! 커뮤니티 탭은 이미 완벽하다고 생각했는데 이런 에러가 있었군요. 저도 제 뷰 한번 다시 점검해보도록 하겠습니다 ㅎㅎ...

이번에 스프린트를 진행하면서 세세한 부분에서 각자 코드를 다르게 작성하는 부분이 있다고 느꼈는데요! 이런 부분은 한번 조율해봐도 좋을 것 같습니다. (e.g. MARK 주석 위치, 개행 등)

리뷰 몇가지를 달아놓았으니 확인 부탁드립니닷. (대부분 질문이예요 ㅎㅎ...) 고생하셨습니다 ~!

Comment on lines +76 to +86
case .mock: MockUpdateAlertPolicyRepository()
case .production: UpdateAlertPolicyRepositoryImpl()
}
}

// MARK: - Community

diContainer.register(for: CommunityRepository.self) { env in
switch env {
case .mock: MockCommunityRepository()
case .production: CommunityRepositoryImpl()
Copy link
Member

Choose a reason for hiding this comment

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

저는 Switch 문이 한줄만 있어도 줄바꿈을 하는 편이라... 이런 부분은 이야기해보고 맞추면 좋지 않을까 생각이 들어요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

코드를 많이 작성하다 보니, 가장 간결한게 최고인 것 같아서 우선 개행하지 않는 편으로 작성하게 되었습니다.
다가오는 토의 시간에 이야기를 해보면 좋을 것 같아요.

}

func isUserRegistered() -> AnyPublisher<CommunityRegistration, WableError> {
func checkUserRegistration() -> AnyPublisher<CommunityRegistration, WableError> {
Copy link
Member

Choose a reason for hiding this comment

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

함수 이름이 깔끔해졌네요! 확실히 동사+주어 조합이 깔끔하고 알아보기 쉬운 것 같습니다. 👍

Comment on lines -34 to +36
private let viewDidLoadRelay = PassthroughRelay<Void>()
private let viewDidRefreshRelay = PassthroughRelay<Void>()
private let registerRelay = PassthroughRelay<Int>()
private let copyLinkRelay = PassthroughRelay<Void>()
private let checkNotificationAuthorizationRelay = PassthroughRelay<Void>()
private let registerSubject = PassthroughSubject<Int, Never>()
private let checkNotificationAuthorizationSubject = PassthroughSubject<Void, Never>()
Copy link
Member

Choose a reason for hiding this comment

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

Relay에서 Subject로 구현 방식을 변경하신 이유가 있을까요 ???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Community 로직을 수정하면서 UIControl의 이벤트를 바로 사용할 수 있다보니, Relay라는 타입 별칭을 사용할 일이 줄어들었습니다.
그렇다 보니 선언 자체에 대한 의문증이 들었습니다.
그래서 일단은 서브젝트로 작성하였습니다.

Comment on lines -23 to +24
let viewDidRefresh: Driver<Void>
let refresh: Driver<Void>
Copy link
Member

Choose a reason for hiding this comment

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

헉 저는 개인적으로 ViewDidRefresh가 더 직관적인 네이밍이라 좋은 것 같긴 합니닷. 혹시 변경하신 이유가 어떤걸까요...?? 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

특별한 이유보다는 코드와 표현을 최대한 간결하게 해보고 싶었어서 다음과 같이 작성했습니다.

let communityListRelay = CurrentValueRelay<[Community]>([])
let isLoadingRelay = CurrentValueRelay<Bool>(false)
let completeRegistrationRelay = CurrentValueRelay<LCKTeam?>(nil)
bindInitialLoad(cancelBag: cancelBag)
Copy link
Member

Choose a reason for hiding this comment

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

오... 이렇게 하면 뷰가 초기화될 때 한번만 실행할 수 있어서 viewDidLoad를 지워도 되는건가요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

전에도 viewDidLoad를 무엇 때문에, 사용했는지 모르겠습니다.
transform은 결국 뷰컨트롤러의 setupBinding에서 호출되고, setupBindingviewDidLoad에서 호출되기 때문에, 사실상 같은 시점이라고 생각되어 이번에 수정하게 되었습니다.

@github-project-automation github-project-automation bot moved this to Ready for Review in Wable-iOS Jun 18, 2025
@github-project-automation github-project-automation bot moved this from Ready for Review to In Review in Wable-iOS Jun 18, 2025
@JinUng41 JinUng41 merged commit 410bafa into develop Jun 24, 2025
1 check was pending
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS Jun 24, 2025
@JinUng41 JinUng41 deleted the fix/#233-community-error branch June 24, 2025 16:22
youz2me pushed a commit that referenced this pull request Oct 26, 2025
[Fix] 커뮤니티 탭 에러 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍻 진웅 술 한잔 가온나~ 🛠️ fix 기능적 버그나 오류 해결 시 사용

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 커뮤니티 탭 오류 수정

3 participants