Skip to content

Commit

Permalink
5 day count improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Nov 15, 2024
1 parent dc1a9e7 commit 262196f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
.equalTo("actionType", "ai research")
.findAll().count()

val startTime = 1731608134
val startTime = 1730408400
val commVoiceResults = mRealm.where(RealmNews::class.java)
.equalTo("userId", user?.id)
.greaterThanOrEqualTo("time", startTime)
Expand Down Expand Up @@ -345,7 +345,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N

fun challengeDialog(voiceCount: Int, courseStatus: String) {
val voiceTaskDone = if (voiceCount >= 5) "" else "[ ]"
val prereqsMet = courseStatus.contains("terminado", ignoreCase = true) && voiceCount >= 1
val prereqsMet = courseStatus.contains("terminado", ignoreCase = true) && voiceCount >= 5
val syncTaskDone = if (prereqsMet) {
val lastPrereqAction = mRealm.where(RealmUserChallengeActions::class.java)
.equalTo("userId", user?.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
.equalTo("actionType", "ai research")
.findAll().count()

val startTime = 1731608134
val startTime = 1730408400
val commVoiceResults = mRealm.where(RealmNews::class.java)
.equalTo("userId", user?.id)
.greaterThanOrEqualTo("time", startTime)
Expand Down Expand Up @@ -345,7 +345,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N

fun challengeDialog(voiceCount: Int, courseStatus: String) {
val voiceTaskDone = if (voiceCount >= 5) "✅" else "[ ]"
val prereqsMet = courseStatus.contains("terminado", ignoreCase = true) && voiceCount >= 1
val prereqsMet = courseStatus.contains("terminado", ignoreCase = true) && voiceCount >= 5
val syncTaskDone = if (prereqsMet) {
val lastPrereqAction = mRealm.where(RealmUserChallengeActions::class.java)
.equalTo("userId", user?.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class MarkdownDialog : DialogFragment() {

val buttonText = when {
courseStatus.contains("no iniciado") -> context.getString(R.string.start)
courseStatus.contains("terminado") && voiceCount < 1 -> context.getString(R.string.next)
courseStatus.contains("terminado") && voiceCount >= 1 -> context.getString(R.string.sync)
courseStatus.contains("terminado") && voiceCount < 5 -> context.getString(R.string.next)
courseStatus.contains("terminado") && voiceCount >= 5 -> context.getString(R.string.sync)
else -> context.getString(R.string.continuation)
}

Expand Down

0 comments on commit 262196f

Please sign in to comment.