You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Force Flutter to use a User setting which is then used to manually add lessons when the user wishes to do so via Quick Study or Learn mode.
Much easier to implement than a cloud function (which would not work offline), or a cron job/background service (alarm manager or something akin to this).
After banging my head against the wall the past couple of days, I've come to a conclusion as to how to tackle the issue that came to light thanks in part to changing the Firestore structure in place, and trying to add this learn mode.
Previous 'thought' was to add all 1.3k~ vocab from the Book Genki 1 to Firestore as an initial test. This would incur a whooping 1.3k writes, and subsequent reads from a single user if it were to happen. On a larger scale, this would incur high costs. I am not happy with the thought that someone could abuse this.
Instead of the above, an addition of a 'premadeListsUsed' field inside the settings, and adding 'learned' vocab only to Firestore, would allow the system to store the premade list/s locally. This is because we can simply compare the list/s locally (the ones mentioned in 'premadeListsUsed') to the Firestore learned vocab to display the items with their respective status on the client.
The above (rather crude) explanation of the system would allow easy addition of new items simply based on items in the list which are not on Firestore, and local scheduling of items via a cron job (let's say one that is running every hour), while keeping reads and writes to a minimum. A more detailed breakdown should follow sometime soon.
In the case of user-made lists, all items would have to be stored on Firestore. To prevent a user from adding some arbitrary amount of items (let's say 1000), security rules need to be put in place.
Another thought would be the writing component. I'm thinking that it would be a good idea to let the user decide during the 'learning' part if they want to write the item or not (as that decision will be then persisted). Subsequent changes to learned items can then be made in the list on the client? Not sure yet as to how to tackle this particular problem.
No description provided.
The text was updated successfully, but these errors were encountered: