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

Corrected widget's event list button to navigate to today's event instead of yesterday's. #186

Conversation

apoumier
Copy link

@apoumier apoumier commented Mar 25, 2024

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

Updated button functionality in the events list widget to navigate to today's events instead of yesterday's.

We have fixed the following issue:

  1. If you change the settings to display more than 1 day of past events, it doesn't scroll to today's date.

We have improved this aspect.

  1. If you don't change the above option, and an event currently shows one day prior, it doesn't scroll to today's date if you had lots of events yesterday. Instead, it just moves a bit below the current view"

While the scrolling functionality for the event list works better now, it still doesn't manage to entirely bring today's date to the top of the display

In Android, it's complicated to use RemoteViews to achieve smooth scrolling in ListView within widgets, and I'm wondering if anyone has any ideas on how to address this.

Before/After Screenshots/Screen Record

New video from the latest commit :

new_video.mp4

Fixes the following issue(s)

Acknowledgement

@Aga-C
Copy link
Member

Aga-C commented Mar 25, 2024

It doesn't work properly. Here are three scenarios where it doesn't scroll as it should:

  1. If you change in Settings to display more than 1 day of past events, it doesn't scroll to today's date.
  2. If you don't change the above option, and event currently shows one day prior, it doesn't scroll to today's date if you had lots of events on yesterday. It just moves a bit below the current view.
  3. Also, if current day is barely visible on a widget (e.g. a bit at the bottom), it doesn't scroll at all.

Another thing, even if it scrolls properly, there's a gap with an old event. Current day should always be at the top. See screenshot (that happened when I was at the bottom and tapped the button to go to today):
obraz

BTW. For the future, please turn on in your phone option to show where are you tapping (it's in Android's developer settings), because these videos now tell absolutely nothing about what you've done.

Also, it's not a codebase improvement, it's a bug fix.

@apoumier
Copy link
Author

Alright, we will correct these issues.

@SunFlowerTos
Copy link

Hello @Aga-C,

We've fixed:

1.If you change the settings to display more than 1 day of past events, it doesn't scroll to today's date.

But we're having a hard time solving scrolling issues. We've done a lot of research but can't find a reliable solution. We're struggling to make scrolling more precise.

Any ideas to help us out?

@apoumier
Copy link
Author

apoumier commented Apr 2, 2024

Hello, @Aga-C we have tried to address the issues you mentioned, but with Android, it is very complicated to achieve very precise scrolling in a widget with RemoteViews.

We also tried to display the current date at the top of the widget, but it doesn't work.
Similarly, when the event appears slightly on the widget, it doesn't show properly

We would like to know if you have any ideas to solve this problem.
Thank you for your response.

It doesn't work properly. Here are three scenarios where it doesn't scroll as it should:

  1. If you change in Settings to display more than 1 day of past events, it doesn't scroll to today's date.
  2. If you don't change the above option, and event currently shows one day prior, it doesn't scroll to today's date if you had lots of events on yesterday. It just moves a bit below the current view.
  3. Also, if current day is barely visible on a widget (e.g. a bit at the bottom), it doesn't scroll at all.

Another thing, even if it scrolls properly, there's a gap with an old event. Current day should always be at the top. See screenshot (that happened when I was at the bottom and tapped the button to go to today): obraz

BTW. For the future, please turn on in your phone option to show where are you tapping (it's in Android's developer settings), because these videos now tell absolutely nothing about what you've done.

Also, it's not a codebase improvement, it's a bug fix.

@Aga-C
Copy link
Member

Aga-C commented Apr 2, 2024

I'm just testing here 🤷‍♀️

@apoumier
Copy link
Author

apoumier commented Apr 2, 2024

Hello @naveensingh ! We are trying to fix the bug of this pull request, but we are having trouble making the scroll of the listview of the event list widget smoother and more efficient when the widget button is pressed. In Android, it's complicated to use RemoteViews to achieve smooth scrolling in ListView within widgets. Do you have any ideas on how to solve this problem ?

@apoumier
Copy link
Author

apoumier commented May 5, 2024

Hello, we would like to fix this bug, can someone answer us?

@naveensingh
Copy link
Member

Do you have any ideas on how to solve this problem ?

  • At the moment, no.

  • You shouldn't have introduced Coroutines, the whole project still uses threads (check the ensureBackgroundThread helper method) and there no plans to migrate now.

  • Function names should start with a lower case.

  • Instead of fetching events yourself, use the EventsHelper class. You can find how it's used in EventListWidgetAdapter

  • The whole logic in updateWidgetData looks too complex for what it does (finding event position in the list)

@naveensingh naveensingh added the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Nov 4, 2024
@fossifybot
Copy link

This pull request has been automatically closed due to inactivity. We requested additional information but have not received a response from the original author. Without the requested details, we cannot proceed. If you have the needed information or updates, please reopen the PR or comment so we can continue the review.

@fossifybot fossifybot closed this Nov 18, 2024
@Aga-C Aga-C removed the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event list widget defaults to yesterday rather than today
5 participants