Skip to content

Add entries in bulk - #87

Open
LordTenebrous wants to merge 1 commit into
albertvaka:mainfrom
LordTenebrous:main
Open

Add entries in bulk#87
LordTenebrous wants to merge 1 commit into
albertvaka:mainfrom
LordTenebrous:main

Conversation

@LordTenebrous

@LordTenebrous LordTenebrous commented Jan 26, 2025

Copy link
Copy Markdown

Hi, I made some changes to add a lot of entries in a row without pressing increase/decrease button for each one.
I make this because when you have to add so much, it takes some time of you pressing that button. Now you can do it by typing how many you want to add.

When you want to add/delete a lot of them it will take a moment to finish that task.

Changes:

ViewModel:
  • Added a mutex variable.

  • decrementCounter(name: String, mode: Boolean)

    • Mutex to prevent concurrency problems.
    • mode: when is true it will show the undo message of observer.onCounterDecremented(). When is false it won't show that message.
  • deleteCounter(name: String)

    • Added mutex to prevent a crash when a counter is incrementing/decrementing and delete the same counter.
EntryViewHolder:
  • Added a new function: dialog()
    • This function is to show the view where you put how many entries you want to add in a row. Then it shows a confirmation view before starting the task.
  • Long click listener: added for decrease button and modified increase
    button.
fragment_entry_long_press:
  • To make the dialog to put the quantity to increase or decrease a counter. This only shows when long pressing increase/decrease button.
Strings:
  • Added some for english and spanish.

Preview

addEntriesInBulk.mp4

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.

1 participant