fix(mobile): sync custom headers back to widget#26035
fix(mobile): sync custom headers back to widget#26035robinwit wants to merge 3 commits intoimmich-app:mainfrom
Conversation
b084075 to
7da83e4
Compare
|
@robinwit can you give this a test on your setup after the refactorings that we made? |
mertalev
left a comment
There was a problem hiding this comment.
I'd really like to minimize the number of places that need these headers to be kept in sync. With #25942, headers are set and persisted platform-side. Widgets have access to them with UserDefaults and SharedPreferences, so they could use this without needing to also sync here.
Ah perfect. @robinwit can you adjust the implementation for widgets to use the headers that are already persisted? We can delete the existing header sync that is exclusive to widgets in favor of the new platform side header source. |
Description
Sets
kWidgetCustomHeaderswhen changing the headers in the app (advanced settings), similar as insaveAuthInfo(), otherwise widgets keep using the old credentials.This fixes "No assets available" shown in widgets when a certain header is required and it was correctly set in the app. Should I create an issue for this?
How Has This Been Tested?
On my iPhone with my Immich instance behind an Nginx with
auth_requestthat is configured to be skipped if a certain header is set (otherwise the app doesn't work: #3118):Nginx config:
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
Claude Opus 4.5 for pinpointing the issue.