0b72827682
Two regressions surfaced on the first real device run.
1. Contrast on ServerUrl + Login screens: both wrapped content in a
bare Box(fillMaxSize), no Surface. The obsidian background never
painted (rendered against the system root view's default),
LocalContentColor cascade fell through to Material's default
contentColor — the screens rendered as near-invisible dark text
on dark grey. Wrap both in Surface(color = background, contentColor
= onBackground) so the bg paints AND the M3 contentColor pipeline
flows correctly through OutlinedTextField labels / cursor /
placeholders + the Button content tint.
2. The bigger bug: NetworkModule.provideRetrofit read
authStore.baseUrl.value ONCE at Retrofit creation. AuthStore loads
from Room async, so at injection time the value was still the
localhost:8080 placeholder. Result: even after the user typed
their real server URL on the ServerUrl screen, every API call
kept hitting localhost:8080 ("Failed to connect to
localhost/127.0.0.1:8080" on the login attempt). The pre-fix
NetworkModule comment even acknowledged it — *"Server-URL
changes require an app relaunch"*.
Fix: per-request rewrite. New BaseUrlInterceptor reads the live
AuthStore.baseUrl.value on every request and rewrites
scheme/host/port of the outgoing URL. Retrofit now keeps a
placeholder baseUrl ("http://placeholder.invalid/") solely to
satisfy its parser; the actual target host is dynamic. Order in
OkHttp chain: BaseUrl first → Auth → logging, so the cookie
interceptor sees the final URL.
New:
- api/BaseUrlInterceptor.kt — per-request scheme/host/port rewrite
from AuthStore.baseUrl. Falls through to the original request
when the stored URL is unparseable.
Modified:
- api/NetworkModule.kt — adds BaseUrlInterceptor to the OkHttp
chain. Drops the AuthStore dependency from provideRetrofit;
swaps baseUrl for the placeholder.
- auth/ui/ServerUrlScreen.kt — Box → Surface wrap.
- auth/ui/LoginScreen.kt — Box → Surface wrap.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 line
2.4 KiB
Plaintext
1 line
2.4 KiB
Plaintext
[{"key":"androidx/customview/view/AbsSavedState$1.class","name":"androidx/customview/view/AbsSavedState$1.class","size":448,"crc":-314667774},{"key":"androidx/customview/view/AbsSavedState$2.class","name":"androidx/customview/view/AbsSavedState$2.class","size":1906,"crc":1283830698},{"key":"androidx/customview/view/AbsSavedState.class","name":"androidx/customview/view/AbsSavedState.class","size":2502,"crc":-779574498},{"key":"androidx/customview/widget/ExploreByTouchHelper$1.class","name":"androidx/customview/widget/ExploreByTouchHelper$1.class","size":1298,"crc":180507148},{"key":"androidx/customview/widget/ExploreByTouchHelper$2.class","name":"androidx/customview/widget/ExploreByTouchHelper$2.class","size":2100,"crc":-1919224779},{"key":"androidx/customview/widget/ExploreByTouchHelper$MyNodeProvider.class","name":"androidx/customview/widget/ExploreByTouchHelper$MyNodeProvider.class","size":1692,"crc":-102436609},{"key":"androidx/customview/widget/ExploreByTouchHelper.class","name":"androidx/customview/widget/ExploreByTouchHelper.class","size":18430,"crc":-1927369275},{"key":"androidx/customview/widget/FocusStrategy$BoundsAdapter.class","name":"androidx/customview/widget/FocusStrategy$BoundsAdapter.class","size":414,"crc":284941525},{"key":"androidx/customview/widget/FocusStrategy$CollectionAdapter.class","name":"androidx/customview/widget/FocusStrategy$CollectionAdapter.class","size":464,"crc":2038458753},{"key":"androidx/customview/widget/FocusStrategy$SequentialComparator.class","name":"androidx/customview/widget/FocusStrategy$SequentialComparator.class","size":2078,"crc":-375256635},{"key":"androidx/customview/widget/FocusStrategy.class","name":"androidx/customview/widget/FocusStrategy.class","size":8306,"crc":377655966},{"key":"androidx/customview/widget/ViewDragHelper$1.class","name":"androidx/customview/widget/ViewDragHelper$1.class","size":594,"crc":-1020873541},{"key":"androidx/customview/widget/ViewDragHelper$2.class","name":"androidx/customview/widget/ViewDragHelper$2.class","size":701,"crc":-592993749},{"key":"androidx/customview/widget/ViewDragHelper$Callback.class","name":"androidx/customview/widget/ViewDragHelper$Callback.class","size":2264,"crc":632691688},{"key":"androidx/customview/widget/ViewDragHelper.class","name":"androidx/customview/widget/ViewDragHelper.class","size":21899,"crc":-1974724746},{"key":"META-INF/androidx.customview_customview.version","name":"META-INF/androidx.customview_customview.version","size":6,"crc":-42031000}] |