-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[init] 프로젝트 기초 세팅 #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일단 반 정도 봤는데,, 여기까지만 달고 이어서 달게요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그녀는 정말 야무지다.. 무려 템플릿까지...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
우하하
} | ||
|
||
private fun setDarkMode() { | ||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MODE_NIGHT_NO 이게 다크모드 설정 안한다는 뜻 맞나요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넹 맞습니다 다크모드를 막아두는 로직이에요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 어디서 어떻게 쓰는 건가여,,?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상단 파일인 DummyService
파일을 보시면 URL, Query 값 등이 상수화 처리 되어있는데요. 해당 부분을 상수화 할 때 사용합니다. 해당 endPoint 들은 서버 측에서 한 번에 변경시키는 경우가 많다고 생각해서 상수화 처리를 해두었습니다! 해당 파일에서만 변경하면 모든 파일에서 변경 되게끔 하려구요
override fun contentType(): MediaType? = | ||
contentResolver.getType(uri)?.toMediaTypeOrNull() | ||
|
||
override fun writeTo(sink: BufferedSink) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 어디에 쓰는 건가요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
멀티파트를 통해 이미지를 서버로 업로드 할 때 사용되는 파일이에요. 해당 함수는 RequestBody (ContentUriRequestBody가 상속받고 있는,,)를 통해 오버라이딩 되는 함수인데요. 특정 Uri로부터 값을 읽어서 BufferedSink 파일에 작성하는 일을 합니다. 즉, 해당 함수는 사용자로부터 받아온 URI를 네트워크로 전송이 가능하도록 만드는 역할을 해요.
@InstallIn(SingletonComponent::class) | ||
object ContentResolverModule { | ||
@Provides | ||
@Singleton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
싱글톤,,, 공부하러 갈게요,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전 아직도 힐트가 어렵다능,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
드디어 다 읽었습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
너 진짜 멋있다 ㅠㅠ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엥 별거 없서요 ㅠㅠ
import org.sopt.dateroad.domain.repository.UserInfoRepository | ||
|
||
@Singleton | ||
class ClearUserInfoUseCase @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 유즈케이스는 어떤 뷰에서 사용하는 건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아마 추후 로그아웃이나 회원탈퇴할 때 사용될 거라 마이페이지 뷰에서 사용될 것 같습니다 ! (유저가 탈퇴나 로그아웃을 하면 sharedPreferences에 저장된 값들을 전부 날려야 하므로 해당 경우에 사용)
app/src/main/java/org/sopt/dateroad/presentation/ui/dummy/DummyViewModel.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엄만 최고야!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 제가 학교 프로젝트 하다가 봤는데 이렇게 오는 response들은 안 받을 수도 있는거에요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넹 형태가 다르다면 BaseResponse 사용하지 않아도 됩니다! 필요한 경우에만 사용해 주세요
} | ||
|
||
override var isLogin: Boolean | ||
get() = sharedPreferences.getBoolean(IS_LOGIN, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인, 로그아웃에서 값 바꿔주거나 하단 네비바 visible바꿔줄 때 여기 구현체에 접근 하면 되는건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로컬에서 관리할 값들을 저장해 줍니다! 보통 AccessToken, RefreshToken 등을 넣어놔요. 여기서는 자동 로그인을 구현하기 위한 자동 로그인 값들 미리 저장해 두었습니다 ~ 추후 설계 단계에서 어떤 것들을 넣을지 같이 정해보면 좋을 것 같네요! 근데 아마 지금 기능에서는 토큰이랑 자동 로그인 정보만 저장해 놓으면 될 것 같아오
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠,, 추가적으로 저장하고 싶은 것들이 있긴 한데 이건 추후 논의해 보도록 합시당
@Multipart | ||
@POST("$API") | ||
suspend fun postDummyMultipart( | ||
@Part image: MultipartBody.Part, | ||
@Part("$CONTENT") content: RequestBody | ||
): BaseResponse<Unit> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엄마가 보라했던 블로그에서 본 형태!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아들 ㅠ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR 확인 감사합니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
우하하
} | ||
|
||
private fun setDarkMode() { | ||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넹 맞습니다 다크모드를 막아두는 로직이에요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상단 파일인 DummyService
파일을 보시면 URL, Query 값 등이 상수화 처리 되어있는데요. 해당 부분을 상수화 할 때 사용합니다. 해당 endPoint 들은 서버 측에서 한 번에 변경시키는 경우가 많다고 생각해서 상수화 처리를 해두었습니다! 해당 파일에서만 변경하면 모든 파일에서 변경 되게끔 하려구요
} | ||
|
||
override var isLogin: Boolean | ||
get() = sharedPreferences.getBoolean(IS_LOGIN, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로컬에서 관리할 값들을 저장해 줍니다! 보통 AccessToken, RefreshToken 등을 넣어놔요. 여기서는 자동 로그인을 구현하기 위한 자동 로그인 값들 미리 저장해 두었습니다 ~ 추후 설계 단계에서 어떤 것들을 넣을지 같이 정해보면 좋을 것 같네요! 근데 아마 지금 기능에서는 토큰이랑 자동 로그인 정보만 저장해 놓으면 될 것 같아오
} | ||
|
||
override var isLogin: Boolean | ||
get() = sharedPreferences.getBoolean(IS_LOGIN, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠,, 추가적으로 저장하고 싶은 것들이 있긴 한데 이건 추후 논의해 보도록 합시당
@InstallIn(SingletonComponent::class) | ||
object ContentResolverModule { | ||
@Provides | ||
@Singleton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전 아직도 힐트가 어렵다능,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엥 별거 없서요 ㅠㅠ
import org.sopt.dateroad.domain.repository.UserInfoRepository | ||
|
||
@Singleton | ||
class ClearUserInfoUseCase @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아마 추후 로그아웃이나 회원탈퇴할 때 사용될 거라 마이페이지 뷰에서 사용될 것 같습니다 ! (유저가 탈퇴나 로그아웃을 하면 sharedPreferences에 저장된 값들을 전부 날려야 하므로 해당 경우에 사용)
Related issue 🛠
Work Description ✏️
-> 지난 1차 회의에서 정했던 대로
Koala 2024.1.1
로 초기세팅 진행하였고, Compose + MVI + 클린 아키텍처를 사용해 dummy 파일 넣어두었습니다!-> GitHub 세팅과, Firebase Crashlytics, Sentry 설정 + 슬랙 연동 모두 진행하였습니다.
Screenshot 📸
Screen_recording_20240627_165915.mp4
Uncompleted Tasks 😅
To Reviewers 📢