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

Removed call history limit (#125) #126

Merged
merged 5 commits into from
Mar 17, 2024

Conversation

Aga-C
Copy link
Member

@Aga-C Aga-C commented Mar 4, 2024

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

  • Removed call history limit of 200 entries.
  • DB queries now always take only 30 entries, it doesn't overwrite entries fetched before.
  • Tested on phones with Android 13 (see the screenshot) and Android 6 (there was a different query for older OS versions).

Before/After Screenshots/Screen Record

Fixes the following issue(s)

Acknowledgement

if (lastId != null) {
selection = "${Calls._ID} < ?"
selectionParams = arrayOf(lastId.toString())
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the Calls.DATE instead of Calls._ID, it would be more reliable.

Copy link
Member

@naveensingh naveensingh Mar 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val lastDate = previousRecents.lastOrNull()?.startTS?.times(1000L)
if (lastDate != null) {
    selection = "${Calls.DATE} < ?"
    selectionParams = arrayOf(lastDate.toString())
}

This should do it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen your comment before, I did it a bit different, but it works.

@naveensingh
Copy link
Member

thanks :)

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.

Add setting for the number of entries shown in call history
2 participants