Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logbook): Tasks not showing #61

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Conversation

OdisBy
Copy link
Member

@OdisBy OdisBy commented Jul 1, 2024

fix(logbook): Tasks not showing when has tasks of just one type "routine" or "study"

Task

This pull request refers to task LOR-XX

  • Does not apply to this pull request

Description

Quando tinha tasks adicionadas de apenas um tipo, por exemplo todas as tasks da minha conta eram do LoryEstudioso eles não estavam sendo exibidas.

Types of changes

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

What changed:

  • UI
  • Business rule
  • Documentation
  • Gradle or Build
  • Navigation
  • Tests
  • Resource files
  • Project architecture
  • Code style

Checklist

  • Have tested the changes.
  • Met all the acceptance requirements of this task.
  • Verified if branch is up-to-date with development (if not - rebase it or merge it).
  • Resolve git conflicts

If any of the acceptance criteria are not met, please explain why below

What is the criteria? Why it is different?

@OdisBy OdisBy requested review from leoallvez and duhdoesk July 1, 2024 13:55
@@ -28,7 +28,7 @@ fun LogbookTaskRemote.toLogbookTask(): List<LogbookTask> {
val idToCard = TaskItem.getAllTaskItems().associateBy { it.taskId }
val logbookItems = mutableListOf<LogbookTask>()

this.data.routine.map { remote ->
this.data.routine?.map { remote ->
logbookItems.add(
LogbookTask(
itemOfCategory = idToCard[remote.categoryId]!!,
Copy link
Collaborator

Choose a reason for hiding this comment

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

O ideal é evitar forçar o uso de um valor nulo. Em vez disso, é melhor implementar uma verificação antes de utilizar o valor.

@leoallvez
Copy link
Collaborator

Muito bom

@leoallvez leoallvez added this pull request to the merge queue Aug 9, 2024
Merged via the queue into develop with commit 2dcda7a Aug 9, 2024
1 check passed
@leoallvez leoallvez deleted the fix/tasks-not-showing branch August 9, 2024 00:13
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