-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalidate Composable on resource change #63
Comments
I'll start experimenting with this now 🤔 |
First attempt: Issue 1 with this approach: Issue 2: |
Next attempt: The issue here is that I am unsure about how to keep the granularity fine enough to be enjoyable. |
Issue: Re-initialization of the lazy (Decompiled) final class CommonMainString0 {
@NotNull
public static final CommonMainString0 INSTANCE = new CommonMainString0();
@NotNull
private static final Lazy company$delegate = LazyKt.lazy(CommonMainString0::company_delegate$lambda$0);
@NotNull
private static final Lazy product$delegate = LazyKt.lazy(CommonMainString0::product_delegate$lambda$1);
private CommonMainString0() {
}
@NotNull
public final StringResource getCompany() {
Lazy var1 = company$delegate;
return (StringResource)var1.getValue();
}
@NotNull
public final StringResource getProduct() {
Lazy var1 = product$delegate;
return (StringResource)var1.getValue();
}
private static final StringResource company_delegate$lambda$0() {
return String0_commonMainKt.access$init_company();
}
private static final StringResource product_delegate$lambda$1() {
return String0_commonMainKt.access$init_product();
}
} If the offsets change, the StringResource objects have to be re-initialized. |
Two options come to mind:
|
e.g. changing a string in a strings.xml should invalidate all composables that relied on the resource
The text was updated successfully, but these errors were encountered: