Skip to content

Conversation

@PeraSite
Copy link
Member

Summary

제휴 지도를 클릭했을 때 학과 정보가 로딩되기 전 "내 제휴" 라고 보이는 부분 수정
마이 페이지를 클릭했을 때 닉네임이 로딩되기 전 "닉네임" 이라고 보이는 부분 수정

Describe your changes

Issue

  • Resolves #

To reviewers

@PeraSite PeraSite self-assigned this Oct 15, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @PeraSite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 UI에서 데이터 로딩 전에 잘못된 초기값이 표시되는 두 가지 문제를 해결합니다. "내 제휴" 지도 클릭 시 학과 정보가 로딩되기 전 "내 제휴"가 보이는 현상과, 마이 페이지 진입 시 닉네임이 로딩되기 전 "닉네임"이 보이는 현상을 개선했습니다. 이는 로컬에 저장된 사용자 데이터를 초기값으로 활용하여 사용자 경험을 향상시킵니다.

Highlights

  • "내 제휴" UI 초기값 문제 해결: 학과 정보 로딩 전 "내 제휴"가 표시되는 문제를 해결하기 위해 로컬 SharedPreferences에서 학과 이름을 가져와 초기값으로 사용하도록 수정했습니다.
  • 마이 페이지 닉네임 UI 초기값 문제 해결: 마이 페이지 로딩 시 닉네임이 로딩되기 전 "닉네임"이 표시되는 문제를 해결하기 위해 로컬 SharedPreferences에서 닉네임을 가져와 초기값으로 설정하도록 변경했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 제휴 지도와 마이페이지에서 데이터가 로딩되기 전에 초기값이 잠시 보이는 문제를 해결합니다. SharedPreferences를 fallback으로 사용하여 로딩 중에도 이전에 저장된 값을 보여주도록 변경한 점이 좋습니다. 전반적으로 올바른 수정 방향이라고 생각합니다. 다만, MyPageViewModel에서 닉네임을 초기화하는 로직에 작은 개선점을 제안합니다.

Comment on lines +46 to +48
nickname = MySharedPreferences.getUserName(context).takeIf {
it.isNotBlank()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

ViewModel이 초기화될 때 SharedPreferences에서 닉네임을 가져와 초기 상태를 설정하는 로직이 추가되었네요. 좋은 접근입니다.

다만, 현재 로직은 isNotBlank만 확인하고 있습니다. fetchMyInfo 메소드나 MyPageStatehasNickname 로직을 보면, user-로 시작하는 닉네임은 유효하지 않은 것으로 처리하고 있습니다.

일관성을 유지하고, 'user-xxxx'와 같은 닉네임이 잠시 보였다가 사라지는 UI 깜빡임 현상을 방지하기 위해, 초기화 시점에도 startsWith("user-") 체크를 추가하는 것이 좋겠습니다.

Suggested change
nickname = MySharedPreferences.getUserName(context).takeIf {
it.isNotBlank()
}
nickname = MySharedPreferences.getUserName(context).takeIf {
it.isNotBlank() && !it.startsWith("user-")
}

Copy link
Member

@HI-JIN2 HI-JIN2 left a comment

Choose a reason for hiding this comment

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

이거 PR 본문에 수정 전, 후를 나누어서 기재해주시면 좀 더 이해하기 수월할 것 같습니다~!
스크린샷이나 동영상 첨부도 같이 해도 좋구염

수고하셨습니다!


// MainState
// MainState - 로컬 SharedPreferences를 fallback으로 사용
val localDepartmentName = remember { MySharedPreferences.getUserDepartmentName(context) }
Copy link
Member

Choose a reason for hiding this comment

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

P1

요거 뷰모델로 옮기는게 좋을 것 같아욤
제가 로깅 때문에 뷰에서 바로 SharedPreferences 호출한 적이 있는 것 같은데, 이것두 같이 바꿔줄 수 있을까욤?

Copy link
Member Author

Choose a reason for hiding this comment

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

그러네용 수정하겠습니다!

@PeraSite PeraSite requested a review from HI-JIN2 October 20, 2025 23:43
Comment on lines 49 to 51
val departmentId: Long = MySharedPreferences.getUserDepartmentId(context).toLong()
val collegeId: Long = MySharedPreferences.getUserCollegeId(context).toLong()

Copy link
Member

Choose a reason for hiding this comment

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

getUserCollegeDepartmentUseCase 이 usecase가 존재해서 MySharedPreferences값을 직접 가져오는 것보다 usecase를 활용하면 어떨까요!!

val departmentId: Long = getUserCollegeDepartmentUseCase().userDepartment.departmentId.toLong()
val collegeId: Long = getUserCollegeDepartmentUseCase().userCollege.collegeId.toLong()

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 잊고 있었네요 수정하겠습니다!

@PeraSite PeraSite requested a review from kangyuri1114 October 21, 2025 10:17
Copy link
Member

@kangyuri1114 kangyuri1114 left a comment

Choose a reason for hiding this comment

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

👍 💯

# Conflicts:
#	app/src/main/java/com/eatssu/android/presentation/MainViewModel.kt
#	app/src/main/java/com/eatssu/android/presentation/map/MapViewModel.kt
#	app/src/main/java/com/eatssu/android/presentation/mypage/MyPageViewModel.kt
@PeraSite PeraSite merged commit 598a8af into develop Oct 23, 2025
1 check passed
@PeraSite PeraSite deleted the fix/slow-loading-state branch October 23, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants