Skip to content
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

Notes disappear when sorting by date #525

Open
JJ840 opened this issue Feb 7, 2024 · 6 comments
Open

Notes disappear when sorting by date #525

JJ840 opened this issue Feb 7, 2024 · 6 comments
Assignees
Labels
bug A bug! Fixing it is a priority UI Involves the user interface

Comments

@JJ840
Copy link

JJ840 commented Feb 7, 2024

Describe the bug

Notes disappear when sorting by due date and don't show up. They aren't lost and return when sorting via another method, but the only thing that shoes up when sorting by due date is the day headers and not the actual items.

how To Reproduce

Open left hand menu
Long click on a list
Sort by Due Date

If applicable

  • add the stacktrace
  • add logcat output as explained here

Technical information

  • Device: Pixel 6 Pro
  • OS: GrapheneOS 2024020500
  • app version: 7.1.7
  • app commit id (only for nightly builds):

Sorting via the 3 dots menu on the upper right also doesn't change the sorting method.
Tried backing up and restoring, didn't change anything.

@JJ840 JJ840 added the bug A bug! Fixing it is a priority label Feb 7, 2024
@CampelloManuel
Copy link
Collaborator

i tried making a list and sorting by date, but i can't replicate. This happens in the app, not in the widget, correct ?

i will try it on other devices in the future, to see if i can replicate.

Sorting via the 3 dots menu on the upper right also doesn't change the sorting method

that menu is a placeholder, the feature is still a work in progress

@CampelloManuel CampelloManuel pinned this issue May 1, 2024
@CampelloManuel
Copy link
Collaborator

I can't replicate.
I will publish an update in a few days.
Can you try uninstalling the app, installing that update, and rewriting the notes to see if it still happens ?

@CampelloManuel
Copy link
Collaborator

@JJ840 update 7.1.8 is now available. Can you verify if the bug is still present ?

@JJ840
Copy link
Author

JJ840 commented Jun 22, 2024 via email

@CampelloManuel
Copy link
Collaborator

CampelloManuel commented Sep 10, 2024

I can now replicate this on a Google Pixel 8a with the stock rom on Android 14.
Updates:

  1. It does not affect how data is saved in the DB, because the app exports the notes correctly
  2. It does not happen on the android emulator for API 34
  3. It happens as far back as in version 6.0.0-beta5
  4. It happens both on a physical google pixel 8a and on the API 35 AVD image of the SDK
  5. The code to present the GUI already receives incorrect data, so it's not a GUI issue
  6. SQLite version
    • on the Google Pixel 8a: 3.32.2 ; bug is present
    • on the API 34 emulator: 3.39.2 2022-07-21 ; bug is NOT present
    • on the API 35 emulator: 3.44.3 2024-03-24 ; bug is present
  7. The problem is in query() in MyContentProvider.java where the line .query(Task.getSECTION_DATE_VIEW_NAME(listId) runs this sql
SELECT _id, title, note, completed, due, updated, lft, rgt, dblist, locked FROM sectioned_date_view_1 WHERE dblist IS '1' ORDER BY secret_typeid,due,secret_typeid2

The query says WHERE dblist IS '1' but some records are saved with dblist = '1' and some with dblist = 1. Android versions up to API 34 did not care about this difference, but on the Google Pixel 8a and on the API 35 AVD image of the SDK, '1' is not equal to 1 in SQLite queries, so the notes are not taken from the database, leading to only the headers being shown.

Also, on the API 34 emulator, on the view sectioned_date_view_1 column dblist is created as INTEGER type, while on the API 35 emulator, it's a BLOB type.

@CampelloManuel CampelloManuel self-assigned this Sep 10, 2024
@CampelloManuel CampelloManuel added the UI Involves the user interface label Sep 10, 2024
@CampelloManuel
Copy link
Collaborator

@JJ840 update 7.1.9 is now available on f-droid and the play store. The bug with the dates should be fixed. Can you try the app and tell me if it works ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug! Fixing it is a priority UI Involves the user interface
Projects
None yet
Development

No branches or pull requests

2 participants