Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Fix issue 2962 #3477

Closed
wants to merge 4 commits into from
Closed

Fix issue 2962 #3477

wants to merge 4 commits into from

Conversation

priyatanu
Copy link
Contributor

@priyatanu priyatanu commented Sep 5, 2024

Pull request (PR) checklist

Please check if your pull request fulfills the following requirements:

  • I've read the Contribution Guidelines and my PR doesn't break the rules.
  • I've read and understand the Developer Guidelines.
  • I confirm that I've run the code locally and everything works as expected.
  • My PR includes only the necessary changes to fix the issue (i.e., no unnecessary files or lines of code are changed).
  • 🎬 I've attached a screen recording of using the new code to the next paragraph (if applicable).

Screen recording of your changes (if applicable):

What's changed?

Describe with a few bullets what's new:
-I've fixed technical debt from the code

  • Transitioned from direct CategoryDao and WriteCategoryDao interactions to using the repository
Before After
{media} {media}
{media} {media}

Risk factors

What may go wrong if we merge your PR?

  • No cases
  • ...

In what cases won't your code work?

  • It works for settings screen
  • ...

Does this PR close any GitHub issues? (do not delete)

Troubleshooting GitHub Actions (CI) failures ❌

Pull request checks failing? Read our CI Troubleshooting guide.

@priyatanu
Copy link
Contributor Author

az_recorder_20240905_181705.mp4

@ILIYANGERMANOV ILIYANGERMANOV requested a review from a team September 5, 2024 16:28
Copy link
Collaborator

@ILIYANGERMANOV ILIYANGERMANOV left a comment

Choose a reason for hiding this comment

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

@priyatanu a few notes:

  1. Let's not update the CategoryRepo usages in the backup usacase because it seems too dangerous
  2. Let's update CategoryDao -> CategoryRepo on all other places in the app

val list = mutableListOf<Category>()
categoryList.filter { either ->
when(either){
is Either.Left -> { error("Failed to insert data to db")}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will crash the app! We don't want such behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. reverted

@ILIYANGERMANOV ILIYANGERMANOV added the requested changes Changes are needed. Please, apply them label Sep 6, 2024
@Vishwa-Raghavendra
Copy link
Contributor

@priyatanu a few notes:

  1. Let's not update the CategoryRepo usages in the backup usacase because it seems too dangerous
  2. Let's update CategoryDao -> CategoryRepo on all other places in the app

Also the dao layer deals with entity classes while repo layer deals with domain classes
old backups will start failing

@github-actions github-actions bot added the Stale No activity, will be automatically closed soon. label Sep 12, 2024
@github-actions github-actions bot closed this Sep 14, 2024
@priyatanu priyatanu deleted the fix-issue-2962 branch October 5, 2024 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
requested changes Changes are needed. Please, apply them Stale No activity, will be automatically closed soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data Layer] Migrate the code to use the new the CategoryRepository
3 participants