Status Update
Comments
th...@gmail.com <th...@gmail.com> #2
Hello, can you please attach a sample that reproduces your error?
ni...@google.com <ni...@google.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
ma...@google.com <ma...@google.com> #4
Based on first_launch_after_installation.mp4
, your paging state is indeed showing null
for nextKey, so it makes sense that Paging concluded there are no more items to load.
So I think the question is why the PagingState
contains only an empty page and null
values. My guess is either
- RemoteMediator REFRESH actually returned empty data - what is the returned
allNewsItems
value on initial REFRESH? - RemoteMediator REFRESH successfully loaded data and inserted it into database, but Paging hasn't processed that yet by the time Append is triggered, so PagingState is empty.
The second case doesn't seem likely though.
If you attach an executable app, I can look into this further.
Otherwise, you may gain more insight through Paging logs with adb shell setprop log.tag.Paging VERBOSE
. You can also try implementing RemoteKeys
in this
ni...@gmail.com <ni...@gmail.com> #5
Hey! I ran into this same issue. It is in fact the second case you mentioned and is documented
I've published a repo
th...@gmail.com <th...@gmail.com> #6
It seems that with material3 you can provide a custom SnackbarVisuals
class to showSnackbar
function. Then you can change how the snackbar looks in SnackbarHost
block based on whether a custom visuals class is passed. That is good enough for me as it allows to customise the snackbar style, thanks for adding it!
th...@gmail.com <th...@gmail.com> #7
Still, a function similar to which I proposed in
se...@google.com <se...@google.com> #8
Shalom do you think it is reasonable to "backport" SnackbarVisuals in M2, provided the existing functionality continues to exist as well.
se...@google.com <se...@google.com> #9
Also, de-prioritized for now because SnackbarVisuals allows your for your requested behavior.
jo...@gmail.com <jo...@gmail.com> #10
I can open a new issue for this if requested but SnackbarVisuals
still doesn't let you use AnnotatedString
for (at least) the Snackbar message
. Without this, we can't style text with emphasis such as italics, bold, etc. Please adjust the API to allow callers to specify an AnnotatedString
for message
and hopefully, actionLabel
.
Description
There are two reasons why I would like to see this added:
AnnotatedString
.stringResource
. You need a Compose lambda for that asstringResource
is annotated with@Composable
.The function would look something like this (in
SnackbarHostState
):Example code using this new function:
See for more information:https://kotlinlang.slack.com/archives/CJLTWPH7S/p1610053528286000