Closed Bug 1973834 Opened 7 months ago Closed 7 months ago

The Compose previews in Bookmarks are broken

Categories

(Firefox for Android :: Bookmarks, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: 007, Assigned: mavduevskiy)

References

Details

Attachments

(1 file)

The Compose previews in BookmarksScreen are broken because of invoking the components singleton. It's used to obtain the AppStore, when it can just be a parameter on the BookmarksScreen API instead.

Components makes a call expecting an application context and all of the FenixApplication singleton dependencies to be initialized, which is broken on Compose previews, since the AppContext is never initialized in that scenario.

https://searchfox.org/mozilla-central/source/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/ui/BookmarksScreen.kt#114

We can either inline the AppStore dependency with the components call as the default value in the API and provide an empty AppStore in the previews, or make it a mandatory parameter of the API and provide the real AppStore at the BookmarksScreen callsite.

:mavduevskiy, any chance you could take this?

Flags: needinfo?(mavduevskiy)

ooopsy

sure

Assignee: nobody → mavduevskiy
Flags: needinfo?(mavduevskiy)
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: