dmfs / opentasks

A task app for Android
Apache License 2.0
939 stars 247 forks source link

Searching on tablet #856

Open hg2581 opened 4 years ago

hg2581 commented 4 years ago

For quite some time I have been unable to perform any searches on my tablet, said tablet running Android 7. In contrast, searching has been working fine on my phones running Android 9. They all run the latest beta but this was true for the release version as well. As soon as I enter a search term and hit Enter, the term disappears and no entries are found, ie completely blank. Is this a known bug?

hg2581 commented 4 years ago

Any chance this might be fixed in the next beta?

dmfs commented 4 years ago

I'm working on this and I want to fix this before releasing the next version. I turned out to be a bit more complicated. The issue is caused by a feedback loop when the details view is set. I've been able to simplify things but that wasn't sufficient yet.

dmfs commented 4 years ago

Ok, here is a first guess for what happens:

I need to break that loop. I'm not sure yet at which point though.

dmfs commented 4 years ago

This is a much harder problem than I anticipated. I think this was introduced by #624. When a task is selected we now replace the details view instead of updating it. This allows simplifying the details fragment and reduce state and state transitions. Unfortunately this will always trigger a call to invalidateOptionsMenu, which wipes the search view (even though the fragment has its own options menu). At present I see 2 options:

  1. revert #624 and go back to "mutable" details view
  2. redesign the tablet UI and get rid of the details fragment

Option 1 would be something I'd like to avoid. Option 2 requires some creative thinking and probably a lot of time. I favor option 2 in combination with #889. This could allow getting rid of the details view. Instead the list view would show cards with more details.