Giter Site home page Giter Site logo

Comments (3)

woefe avatar woefe commented on June 22, 2024

Thanks for the report. I agree, it should not be possible to add duplicates to a list. I'm afraid, I will not implement your suggested behaviour for now, because:

  • Asking to increment the number of items won't work, because the amount-text-field allows strings like "500g" or "1 package". I.e. there is no universal way to increment the amount
  • Filtering and autocompletion might conflict (I will have to wait and see how it actually turns out)

But I will design the autocompletion mechanism so that it does not suggest items that are already on the list.

from shoppinglist.

woefe avatar woefe commented on June 22, 2024

And I will also make sure that an item cannot be added twice. I will only show a Toast (popup) notifying the user that the item is already on the list

from shoppinglist.

woefe avatar woefe commented on June 22, 2024

I decided to allow duplicates, but show a little warning, if the item is already on the list. The main reason for that is the underlying data structure, which are simple text files. I assume that these files can be changed externally and there is no way to enforce that there are no duplicate lines in these files.

from shoppinglist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.