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

Bug: Unable to delete autocomplete history items #5168

Conversation

anikiki
Copy link
Contributor

@anikiki anikiki commented Oct 21, 2024

Task/Issue URL: https://app.asana.com/0/488551667048375/1208592488628219/f

Description

Fixed item deletion from suggestions.

Steps to test this PR

Test in Browser:

  • Install from this branch
  • Search for something, i.e. "dog food".
  • Search for "dog".
  • Long press and delete the "dog food" entry.
    Verify:
  • That the keyboard is shown.
  • That the autocomplete list is shifted up (So the position of the entry is visible).
  • That the entry is deleted from the list.

Test using the widget

  • Install from this branch
  • Add the widget.
  • Search for something from the widget, i.e. "dog food".
  • Search for "dog".
  • Long press and delete the "dog food" entry.
    Verify:
  • That the keyboard is shown.
  • That the autocomplete list is shifted up (So the position of the entry is visible).
  • That the entry is deleted from the list.

NO UI changes

@anikiki anikiki changed the title Fixed item deletion from suggestions. Bug: autocomplete pixels firing when Adding Bookmark Oct 21, 2024
@anikiki anikiki changed the title Bug: autocomplete pixels firing when Adding Bookmark Bug: Unable to delete autocomplete history items Oct 21, 2024
@anikiki anikiki marked this pull request as ready for review October 21, 2024 21:00
@@ -45,10 +44,6 @@ abstract class TabsDao {
@Query("select * from tabs where deletable is 0 order by position")
abstract fun flowTabs(): Flow<List<TabEntity>>

// TODO: ANA to remove this
@Query("select * from tabs where deletable is 0 order by position")
abstract fun singleTabs(): Single<List<TabEntity>>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed also some unused code.

@@ -82,8 +81,6 @@ class TabDataRepository @Inject constructor(

private var purgeDeletableTabsJob = ConflatedJob()

override fun getTabsObservable(): Single<List<TabEntity>> = tabsDao.singleTabs()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same, removed unused code.


// TODO: ANA to remove this
implementation "io.reactivex.rxjava2:rxjava:_"
implementation "io.reactivex.rxjava2:rxandroid:_"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed unneeded dependencies.

@@ -44,8 +43,6 @@ interface TabRepository {

val tabSwitcherData: Flow<TabSwitcherData>

fun getTabsObservable(): Single<List<TabEntity>>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused.

@@ -3696,7 +3696,7 @@ class BrowserTabViewModel @Inject constructor(
}
}

fun autoCompleteSuggestionsShown() {
fun onAutoCompleteSuggestionsChanged() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed this.

Copy link
Contributor

@joshliebe joshliebe left a comment

Choose a reason for hiding this comment

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

Nice! Tested, works as expected now 🙂

@anikiki anikiki force-pushed the fix/ana/bug_autocomplete_pixels_firing_when_adding_bookmark branch from 77a9ff2 to 688b218 Compare October 22, 2024 08:21
@anikiki anikiki force-pushed the fix/ana/bug_unable_to_delete_autocomplete_history_items branch from 1983187 to c5043f4 Compare October 22, 2024 08:21
@anikiki anikiki merged commit 698fd63 into fix/ana/bug_autocomplete_pixels_firing_when_adding_bookmark Oct 22, 2024
4 of 5 checks passed
@anikiki anikiki deleted the fix/ana/bug_unable_to_delete_autocomplete_history_items branch October 22, 2024 11:40
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.

2 participants