wordpress-mobile / WordPress-Login-Flow-Android

Pluggable WordPress login flow for Android
GNU General Public License v2.0
14 stars 3 forks source link

[Jetpack] Ignore Jetpack CP filter when adding self-hosted sites from Jetpack app #120

Closed thomashorta closed 8 months ago

thomashorta commented 8 months ago

This is part of the fix for: https://github.com/wordpress-mobile/WordPress-Android/issues/18223

Companion PR: https://github.com/wordpress-mobile/WordPress-Android/pull/18952

Since we didn't have a way of identifying if the current login for self-hosted sites was being done from the Jetpack app, the filter for removing Jetpack CP-connected sites was executed, but for the Jetpack app this should never be the case.

This fix introduces a new LoginMode for identifying JETPACK_SELFHOSTED logins, and reuses the existing logic for JETPACK_LOGIN_ONLY for keeping the Jetpack CP-connected sites when fetching all sites.