Repository navigation
fix: 진단 로그를 자리마다 다르게 남기고 자정을 넘겨도 오늘 회차를 본다 (170, 171) - #172
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Issues
Closes #170
Closes #171
📎 Work Description
둘 다 어제 넣은 변경이 남긴 자리라 한 PR 로 묶었습니다.
진단 로그가 다섯 곳에서 같은 말을 했다 (#170)
UserRepository의 catch 다섯 곳이 전부 「공유 코드 보장 실패」 를 남겼습니다. #134 에서 예외를 삼키던 catch 에 로그를 넣을 때 같은 문구와 같은 주석이 복사됐고, 실제로 그 설명이 맞는 곳은ensureShareCode하나뿐이었습니다.릴리스 빌드는 R8 로 난독화되어 스택 트레이스의 메서드 이름이 사라집니다(
proguard-rules.pro는data.model과navigation만 keep 합니다). logcat 과 Crashlytics 에 남는 단서가 사실상 이 문자열뿐이라, 계정 삭제 실패와 FCM 토큰 저장 실패가 같은 문구로 나와 구분되지 않았습니다. 각 자리를 그 함수가 실패한 일로 바꾸고 잘못 복사된 주석을 지웠습니다.자정을 넘기면 완료가 어제 회차에 기록됐다 (#171)
observeSchedulesForDate는 구독을 걸 때 받은 날짜를 붙잡고 이후 모든 스냅샷을 그 날짜의 회차로 펼칩니다. #130 이전에는 「목록이 어제 것을 보여 준다」 로 끝났지만, 지금은 그 회차 식별자가 완료 기록의 열쇠라 잘못된 날짜가 서버에 남습니다.어르신이 앱을 홈 버튼으로만 닫고 다음 날 아침 다시 열면, 「매일 혈압약」 이 어제 회차로 떠 있고 체크하면
completedDates에 어제 날짜가 들어갑니다. 나중에 프로세스가 죽고 앱을 새로 켜면 오늘 회차가 미완료로 다시 나타나 「어제 분명히 체크했는데 되돌아갔다」 로 보입니다.두 겹으로 막았습니다.
today = true로 건 구독은 스냅샷이 올 때마다 날짜를 다시 읽습니다. 날짜를 사용자가 고르는 시간표 화면은false라 고른 날이 흔들리지 않습니다.ScreenResumed를 보내고, 구독을 건 날과 오늘이 다르면 다시 겁니다. 스냅샷이 오지 않는 밤에도 아침에 앱을 열면 오늘로 맞춰집니다.📷 Screenshot
화면 변경 없습니다.
💬 To Reviewers
ktlintFormat·testDebugUnitTest(전 모듈 112개 통과) ·:app:lintDebug초록입니다.MainViewModelTest에 둘을 넣었습니다 — 오늘 구독이 날짜를 다시 읽는 쪽으로 걸리는지, 같은 날 화면이 다시 보일 때 헛구독을 하지 않는지.