DailyQuestionViewModel and PartnerHomeViewModel each held a raw db.collection(...).addSnapshotListener on the partner's answer doc (just reading snapshot.exists()). Replace with the existing, proven FirestoreAnswerDataSource.observeAnswerForUser(...) Flow collected in a viewModelScope Job (auto-cancelled; previous run cancelled on restart) — dropping the FirebaseFirestore injection from both. Same behavior (exists → non-null), now through the data layer. Verified live: daily question shows the correct "waiting for your partner" state via the new Flow; compiles + unit suite green. HomeViewModel's two listeners use MetadataChanges.INCLUDE + inline analytics and drive the core reveal — left as a scoped follow-on (needs a metadata-aware data-source Flow + two-device real-time verification). See docs/standardization-review.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| schemas | ||
| src | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||