Skip to content

Combine EditPhrasesKeyboardFragment and AddPhraseKeyboardFragment #496

@kaffn8ed27

Description

@kaffn8ed27

These fragments are both subclasses of EditKeyboardFragment, and have very similar functionality. EditPhrasesKeyboardFragment should be able to handle both jobs, with the following changes:

  • Add a boolean nav arg that identifies whether a phrase is being added (a var already exists in the fragment for this, but its value is always false)
  • Pass the appropriate value for said nav arg when editing vs. adding a new phrase (tapping existing phrase or using + button)
  • Alter nav graph so that the + button on EditCategoryPhrasesFragment opens an Edit fragment instead of an Add fragment
  • Add the function addPhrase to EditPhrasesViewModel: see AddPhraseViewModel
  • Probably replace use of deprecated ILegacyCategoriesAndPhrasesRepository in PhrasesUseCase (may be best broken out into future work)

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions