feat-onboarding- CLan setting#242
Conversation
| orientation = LinearLayout.VERTICAL | ||
| } | ||
| val titleText = TextView(context).apply { | ||
| text = "Hoàn thành hướng dẫn" |
There was a problem hiding this comment.
Hardcoded Vietnamese title — use R.string resources so English locale is not broken.
|
|
||
| if (shouldShow) { | ||
| banner.visibility = View.VISIBLE | ||
| ownerOnboardingTitle?.text = if (isOwner) "Hoàn thành hướng dẫn" else "Bắt đầu nào" |
There was a problem hiding this comment.
Banner title/subtitle hardcoded in Vietnamese — wire clan_onboarding_* strings for i18n.
| val currentUserId = com.mezon.mobile.core.StartupCache.userId.toLongOrNull() ?: 0L | ||
| val isOwner = clan.creatorId == currentUserId && currentUserId != 0L | ||
| if (isOwner) { | ||
| OwnerOnboardingManager.setSentMessage(ctx, clanId, true) |
There was a problem hiding this comment.
setSentMessage runs before send succeeds — move to pendingMessageSent/ack to avoid false task completion.
| if (partCount > 0) this.partCount = partCount | ||
| } | ||
| if (partCount > 0) { | ||
| try { |
There was a problem hiding this comment.
Unrelated multipart reflection refactor — split PR; swallowed errors may drop partCount on uploads.
| } | ||
| } | ||
|
|
||
| loadClanMembers(clanId, noCache = true) |
There was a problem hiding this comment.
loadClanMembers(noCache=true) on every AddClanUser — gate on clanMembersChanged to skip redundant REST.
|
Review summary (8 inline comments posted):
Verdict: Request changes — i18n + premature task completion on send/visit paths. |
| } | ||
| } | ||
| 2 -> { | ||
| memberOnboardingRepository.completeVisitTask(clanId, currentMission.channelId) |
There was a problem hiding this comment.
completeVisitTask before navigate — mark visit complete only after the channel is actually opened.
| notificationCenter.postNotificationName(NotificationCenter.ownerOnboardingStateChanged) | ||
| } | ||
| } | ||
| memberOnboardingRepository.completeVisitTask(clanIdForJoin, channel.channelId) |
There was a problem hiding this comment.
completeVisitTask on every non-owner channel tap — gate with isEligible to avoid hot-path work when onboarding is off.
| } | ||
|
|
||
| fun isInvitedFriends(context: Context, clanId: Long, hasOtherMember: Boolean = false): Boolean { | ||
| return hasOtherMember |
There was a problem hiding this comment.
isInvitedFriends ignores prefs — setInvitedFriends is dead; read prefs or remove the setter.
No description provided.