Skip to content

Conversation

@krystek-dev
Copy link
Collaborator

This commit introduces the ability to save and update user data (first and last name) in the database.

Key changes:

  • Added Repository class to handle data operations, including saving and updating user names.
  • Implemented saveName function in Repository to insert a new user or update an existing one based on the last name.
  • Added MainViewModel to manage UI logic for user input and interaction.
  • Implemented onClick function in MainViewModel to trigger the save/update operation in the repository.
  • Updated UserDao with suspend functions for insertAll and added a new update function.
  • Modified MainActivity to include input fields for first and last names and a "Ulozit" (Save) button.
  • The UI now allows users to enter their first and last names and save them to the database.

This commit introduces the ability to save and update user data (first and last name) in the database.

Key changes:
- Added `Repository` class to handle data operations, including saving and updating user names.
- Implemented `saveName` function in `Repository` to insert a new user or update an existing one based on the last name.
- Added `MainViewModel` to manage UI logic for user input and interaction.
- Implemented `onClick` function in `MainViewModel` to trigger the save/update operation in the repository.
- Updated `UserDao` with `suspend` functions for `insertAll` and added a new `update` function.
- Modified `MainActivity` to include input fields for first and last names and a "Ulozit" (Save) button.
- The UI now allows users to enter their first and last names and save them to the database.
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