stefan-niedermann / nextcloud-tables

📊 Android client for nextcloud tables app
https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.tables.play
GNU General Public License v3.0
29 stars 5 forks source link

Error when editing with yes/no field and star rating #12

Open Markoise opened 1 year ago

Markoise commented 1 year ago

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug I have a yes/no field in one column and a star rating in another column. If I change the yes/no field to yes and leave the star rating untouched, the change is saved. If I then edit the star rating afterwards, the yes/no field is changed back to no.

Versions

Smartphone (please complete the following information):

stefan-niedermann commented 1 year ago

Which version of the Tables Android app do you have installed? (Check out the About section in the sidebar)

Markoise commented 1 year ago

Which version of the Tables Android app do you have installed? (Check out the About section in the sidebar)

1.0.8

stefan-niedermann commented 1 year ago

I have an idea what might be wrong.

Just to clarify: After editing the yes/no column, you press the Save button in the top right, which will lead you back to the table. Then you open the edit dialog again to also set the star rating, is this correct? Does at this time the yes/no setting show the correct state or the previous state? (before pressing Save a second time)?

Markoise commented 1 year ago

I have an idea what might be wrong.

Just to clarify: After editing the yes/no column, you press the Save button in the top right, which will lead you back to the table. Then you open the edit dialog again to also set the star rating, is this correct? Does at this time the yes/no setting show the correct state or the previous state? (before pressing Save a second time)?

yes. the yes/no setting ist shown correctly. After saving, the yes/no field is reset. You can see that right after you come back to the table. If you open this data record again, the star rating is correct, but the yes/no field changed from yes to no.

stefan-niedermann commented 1 year ago

Alright, please try after saving the yes/no field and returning to the table to wait for 20-30 seconds. Check whether the value gets eventually updated in the table view. I know we have a performance issue here, so my assumption is that updating the table view takes too much time - directly clicking on the row again to edit the stars value will work on the "old" state and therefore override the yes/no value which was changed in the meantime.

Note for me: Besides solving the mentioned performance issue another option is to not pass the complete row to the edit activity but to only pass the row ID and refetch the data from the database

Markoise commented 1 year ago

I have a small movie database here as a spreadsheet. I imported the film list a few weeks ago and already put yes in the yes/no field. That was before I found the Android app. I rate the films retrospectively.

Nevertheless, I tried again. To do this, I edited a data record with yes in the yes/no field and gave it a star rating. In the table view, a sync icon is displayed in the row. The value in the table is already shown here as No although it was previously set to Yes. The sync icon does not disappear. Even if I reload the table.

It doesn't look like it's the speed problem.