Skip to content

feat-onboarding- CLan setting#242

Open
kind6688 wants to merge 5 commits into
mainfrom
feat-onboarding-
Open

feat-onboarding- CLan setting#242
kind6688 wants to merge 5 commits into
mainfrom
feat-onboarding-

Conversation

@kind6688

@kind6688 kind6688 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@kind6688 kind6688 changed the title [WIP]feat-onboarding- feat-onboarding- CLan setting Jun 9, 2026
@kind6688

kind6688 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

mezonai/mezon#13242

orientation = LinearLayout.VERTICAL
}
val titleText = TextView(context).apply {
text = "Hoàn thành hướng dẫn"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

setSentMessage runs before send succeeds — move to pendingMessageSent/ack to avoid false task completion.

if (partCount > 0) this.partCount = partCount
}
if (partCount > 0) {
try {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated multipart reflection refactor — split PR; swallowed errors may drop partCount on uploads.

}
}

loadClanMembers(clanId, noCache = true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

loadClanMembers(noCache=true) on every AddClanUser — gate on clanMembersChanged to skip redundant REST.

@huylexuan44

Copy link
Copy Markdown
Contributor

Review summary (8 inline comments posted):

  • i18n: ClansFragment banner uses hardcoded Vietnamese instead of strings.xml
  • Regression: owner send-message task marked complete before message ack
  • Unrelated MezonApi multipart reflection changes should be split out
  • Perf: redundant loadClanMembers(noCache) on every AddClanUser socket event
  • Visit missions may complete before the user actually opens the channel

Verdict: Request changes — i18n + premature task completion on send/visit paths.

}
}
2 -> {
memberOnboardingRepository.completeVisitTask(clanId, currentMission.channelId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

completeVisitTask before navigate — mark visit complete only after the channel is actually opened.

notificationCenter.postNotificationName(NotificationCenter.ownerOnboardingStateChanged)
}
}
memberOnboardingRepository.completeVisitTask(clanIdForJoin, channel.channelId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isInvitedFriends ignores prefs — setInvitedFriends is dead; read prefs or remove the setter.

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.

2 participants