Skip to content

feat(newsletter): implement image fetching from WordPress storage#32

Merged
Theo-lbg merged 1 commit intomainfrom
feat/migrationFirebasetoWP
Sep 19, 2025
Merged

feat(newsletter): implement image fetching from WordPress storage#32
Theo-lbg merged 1 commit intomainfrom
feat/migrationFirebasetoWP

Conversation

@Theo-lbg
Copy link
Contributor

@Theo-lbg Theo-lbg commented Sep 19, 2025

New change proposal

Thank you for contributing to XpeApp Android

This pull request refactors the way newsletter preview images are fetched and displayed. Instead of retrieving images directly from Firebase Storage in the FirebaseService, the logic now fetches images via the WordPress API using the WordpressRepository. The main changes include removing the image-fetching method from FirebaseService, introducing new methods in WordpressRepository and WordpressService to fetch images from WordPress, and updating the NewsletterViewModel to use this new approach.

Change category

  • Feature

Description

Newsletter image fetching refactor:

  • Removed the getLastNewsletterPreview method from FirebaseService, eliminating direct Firebase Storage access for newsletter images.
  • Added a new getImage method to WordpressRepository to fetch image bytes from the WordPress API, including error handling.
  • Updated WordpressService with a new endpoint method fetchImageStorage to retrieve images from the WordPress backend.
  • Modified NewsletterViewModel to use WordpressRepository.getImage for fetching and decoding newsletter preview images, replacing the old Firebase-based logic.

Code cleanup and dependency updates:

  • Removed unused imports from FirebaseService and added necessary imports to NewslettersViewModel for image decoding and logging.

Screenshots (if any)

Image with the actual Newsletter and picture in the table local.
image

Checklist

  • I have tested my changes in local using android mobile physical
  • The previous tests still works
  • I did not broke anything to ensure reverse compatibility
  • README updated

@Theo-lbg Theo-lbg merged commit 20d94ca into main Sep 19, 2025
9 checks passed
@Theo-lbg Theo-lbg deleted the feat/migrationFirebasetoWP branch September 19, 2025 15:14
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.

[Migration Firebase] Android Mobile - Transfer ours endpoint in WordPress env

5 participants