Wordpress-android: List of Users Available for Mentions Does Not Refresh

Created on 4 Aug 2020  路  2Comments  路  Source: wordpress-mobile/WordPress-Android

Describe the bug

On Android, the list of users available for use in an @-mention is not refreshed after it is initially loaded. In other words, the initial list of users appears to never get updated after it is initially downloaded.

To Reproduce

In the following steps, the same bug can be seen by either performing an @-mention when typing a comment or adding an @-mention inside the gutenberg editor. For convenience, the steps below only specify adding a mention within the gutenberg editor.

  1. Using WPAndroid, switch to a test site and add a mention within the gutenberg editor
  2. Observe that there are N mention candidates
  3. On the web, add a new user as an Editor to the test site
  4. Kill WPAndroid, restart it, and add a mention within the gutenberg editor
  5. Observe that there are still N mention candidates (i.e., the newly added user _is not_ listed)
  6. Delete all app data (or uninstall and reinstall the app)
  7. Open the app and add a mention within the gutenberg editor
  8. Observe that there are now N+1 mention candidates (i.e., the newly added user _is_ listed)
  9. On the web, remove the user you added to the test site in step 3
  10. Kill WPAndroid, restart it, and add a mention with the gutenberg editor
  11. Observe that there are N+1 mention candidates (i.e., the newly removed user _is still_ listed)
  12. Delete all app data (or uninstall and reinstall the app)
  13. Open the app and add a mention within the gutenberg editor
  14. Observe that there are N mention candidates (i.e., the newly removed user is no longer listed)

Expected behavior

Inserting a mention should display a list with the current list of users for the site. At worst, killing the app and restarting should refresh the list of users. It should _not_ be necessary to wipe the app's data to get an updated list of users.

Smartphone

  • Device: Pixel 1
  • OS: Android X
  • Version: WPAndroid 0ebce45f8b (HEAD of develop on August 4, 2020)

Additional context

This appears to be caused by this code, which pulls the list of mentions from the database and then only makes an API call for the list of users if the database table is empty.

[Type] Bug gutenberg-mobile

All 2 comments

馃憢 @mchowning with https://github.com/wordpress-mobile/WordPress-Android/pull/12607 merged, can this be closed?

Thanks @guarani, you're right it can be closed.

Was this page helpful?
0 / 5 - 0 ratings