Skip to content

Dev #8

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

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Dev #8

merged 3 commits into from
Jun 6, 2023

Conversation

sollarp
Copy link
Contributor

@sollarp sollarp commented Jun 4, 2023

I added the following improvement to the project.
UI:

  • UI improvement on chat text length to fit.
  • Added Bin icon and make it clickable to remove conversation.
    Code:
  • Deleting function to chat conversation which removes conversation items and message items from firebase.
  • Using the benefit of Flow deleted item removes itself from UI.

Pre-launch Checklist

  • [x ] I read the rules PR (title, labels, commit messages...).
  • [x ] I definitely don't PR files with pointless edits.
  • [x ] I added screenshots if change UI/UX (has modified code in lib/src/ui/*).
  • [- ] I writen all test cases coverage and all passed.
  • [x ] All existing and new tests are passing.

Testcases covered (check if passed)

  • [- ] Case 1
  • [- ] Case 2
  • [- ] Case 3

Screenshots (if change UI/UX)

Screenshot from 2023-06-04 15-06-34

@lambiengcode lambiengcode self-requested a review June 4, 2023 16:34
const val matchResultTurboString = "\"content\":"
Copy link
Owner

Choose a reason for hiding this comment

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

what is different here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the confusion my commit not clear. I have stored a val in here and made a push but found out it is not a good idea and removed it that is why noting has been changed in here.

@@ -5,5 +5,5 @@ import com.chatgptlite.wanted.models.ConversationModel
interface ConversationRepository {
suspend fun fetchConversations() : MutableList<ConversationModel>
fun newConversation(conversation: ConversationModel) : ConversationModel
fun deleteConversation()
fun deleteConversation(index: Int)
Copy link
Owner

Choose a reason for hiding this comment

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

I'd prefer to use conversationId, it will make sure which conversation is deleted than using index

Copy link
Contributor Author

@sollarp sollarp Jun 5, 2023

Choose a reason for hiding this comment

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

Yes, I got the feeling that would not be the best approach(The way I was thinking about this: If I add a new conversation and than try to delete after a sec this would require to recall the firebase to find the documentPath id to able to remove it). I have created this code before the message delete function where I'm using the conversationId to remove message from firebase. I will correct this. The project is very interesting thank you for sharing.

Copy link
Owner

Choose a reason for hiding this comment

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

Great! Thank you a lot.

Copy link
Owner

@lambiengcode lambiengcode left a comment

Choose a reason for hiding this comment

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

Glad you're interested in this repo! GJ

@sollarp sollarp requested a review from lambiengcode June 5, 2023 21:36
Copy link
Owner

@lambiengcode lambiengcode left a comment

Choose a reason for hiding this comment

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

lgtm

@lambiengcode lambiengcode merged commit 067fe2d into lambiengcode:main Jun 6, 2023
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