Status Update
Comments
sa...@gmail.com <sa...@gmail.com> #2
Are you saying that loadState being null is more correct initial state compared to the current
```
CombinedLoadStates(
refresh = InitialLoadStates.refresh,
prepend = InitialLoadStates.prepend,
append = InitialLoadStates.append,
source = InitialLoadStates
)
private val IncompleteLoadState = LoadState.NotLoading(false)
private val InitialLoadStates = LoadStates(
IncompleteLoadState,
IncompleteLoadState,
IncompleteLoadState
)
```
at...@google.com <at...@google.com>
ak...@google.com <ak...@google.com> #3
Ideally we would not pass any initial state because it will always have some case where it is wrong - we should ideally wait for a real event from Paging before sending it downstream to user.
For example the initial state:
CombinedLoadStates(
refresh = InitialLoadStates.refresh,
prepend = InitialLoadStates.prepend,
append = InitialLoadStates.append,
source = InitialLoadStates
)
...will always have null
mediator states, even if they are using RemoteMediator. This can mess up loadstate logic that is waiting for some combination of source + mediator loads to happen. It's easy to filter the initial case, but it gets complicated if they want to switchMap between multiple streams and they all start with this initial state. Or also consider the case when coming from cached state and needing to filter this out... it's bad developer UX.
So we could either set this to nullable to denote "no state" or we could have some constant we use that can be easily filtered out like "BogusLoadState" and then people can do .filter { it !== BogusLoadState }
fl...@gmail.com <fl...@gmail.com> #4
Alternatively, if we can read whether we have RemoteMediator
or not, we could try this for initial state which would be a lot more accurate:
private val InitialLoadStates = LoadStates(
LoadState.Loading,
IncompleteLoadState,
IncompleteLoadState
)
CombinedLoadStates(
refresh = InitialLoadStates.refresh,
prepend = InitialLoadStates.prepend,
append = InitialLoadStates.append,
source = InitialLoadStates,
mediatr = ??
)
lb...@gmail.com <lb...@gmail.com> #5
Don't you mind trying it out? You are better person for figuring out how to get RemoteMediator from PagingDataDiffer. To be honest I don't even know what RemoteMediator is used for
at...@google.com <at...@google.com> #6
Branch: androidx-main
commit b7f9085d0b13af5a346d0712bbf3bc5a680c2fc9
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Apr 28 22:10:36 2022
Changing LazyPagingItem's inital LoadState refresh to Loading
Rather than LazyPagingItem having the inital LoadState
refresh being set to LoadState.NotLoading, we want it
to be LoadState.Loading
RelNote: "`LazyPagingItems` now sets the initial
`loadState` to have a `LoadState.Loading` refresh."
Test: lazyPagingInitialLoadState
Fixes: 224855902
Change-Id: I55043244f92c8029e4667df2e23c5813dcf2f729
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-compose/src/androidTest/java/androidx/paging/compose/LazyPagingItemsTest.kt
lb...@gmail.com <lb...@gmail.com> #7
at...@google.com <at...@google.com> #8
Is this the same issue reported in
lb...@gmail.com <lb...@gmail.com> #9
Is this the same issue reported in
which was set as Won't Fix? Because we did follow the recommendation from there to skip the first state, so we will have to revert that code. https://issuetracker.google.com/issues/190788885
Yes, part of the intention here is that people will no longer need to add this workaround in their code.
at...@google.com <at...@google.com> #10
Let's take a search screen example. When the user first enters the search screen, nothing is loading until the user enters its search in the textfield then clicks the search button. Then the state should be Loading.
I guess we should use the workaround provided here
lb...@gmail.com <lb...@gmail.com> #11
It might be too late for some people, but if people want to know how to tackle this I've played around with it on a pet project ( didn't test this in a prod environment, so a heads up there ):
@Composable
fun <T : Any> LazyPagingItems<T>.refreshLoadState(): State<LoadState> = produceState<LoadState>(
LoadState.NotLoading(false),
) {
snapshotFlow { loadState }
.drop(1)
.map { it.refresh }
.collect { value = it }
}
at...@google.com <at...@google.com> #12
Re
Given the most common use case displays paged data right away, defaulting LoadState to Loading
means the most common use case will not have to drop first LoadState (versus if it were NotLoading).
at...@google.com <at...@google.com> #13
I don't get how initial state being anything would affect the use case of displaying paged data right away. Wouldn't the LoadState
change before the user has time to notice?
IMHO, initial state being NotLoading
would be the sanest choice. In the case of waiting before starting to load data, the correct state would be shown to the user and in the case of loading data right away, it would immediately change to Loading
, so the correct state would be shown to the user in this case as well.
ab...@gmail.com <ab...@gmail.com> #14
Re collectAsLazyPagingItems
compose launches collection on Pager right away. By the time pager.collectAsLazyPagingItems()
returns, data is loading, so initial Loading
is the correct state.
Initializing with NotLoading
also causes other issues (which is why Paging with Views was also refactored to not initialize with NotLoading):
- For users who rely on first
NotLoading
state as indication of refresh complete, they have to manually filter out the firstNotLoading
- If loading animation (i.e. spinners) are based on LoadStates, you could end up seeing a blank screen --> spinner --> data loaded in, and that is not a good user experience.
ab...@gmail.com <ab...@gmail.com> #15
lb...@gmail.com <lb...@gmail.com> #16
lb...@gmail.com <lb...@gmail.com> #17
lb...@gmail.com <lb...@gmail.com> #18
bm...@gmail.com <bm...@gmail.com> #19
lb...@gmail.com <lb...@gmail.com> #20
ko...@gmail.com <ko...@gmail.com> #21
ko...@gmail.com <ko...@gmail.com> #22
lb...@gmail.com <lb...@gmail.com> #23
lb...@gmail.com <lb...@gmail.com> #24
lb...@gmail.com <lb...@gmail.com> #25
lb...@gmail.com <lb...@gmail.com> #26
visit
lb...@gmail.com <lb...@gmail.com> #27
visit
lb...@gmail.com <lb...@gmail.com> #28
lb...@gmail.com <lb...@gmail.com> #29
is...@gmail.com <is...@gmail.com> #30
is...@gmail.com <is...@gmail.com> #31
is...@gmail.com <is...@gmail.com> #32
Votre proposition est excellente ! L'introduction d'une vérification d'identité pour renforcer la sécurité sur Twitch serait certainement bénéfique. Cependant, pour garantir que ces nouvelles fonctionnalités soient accessibles à un public international, la contribution d'un interprète anglais est essentielle. Besoin d'une traduction ou interprétation urgente ? GFTIJ fournit des services professionnels disponibles 24/7 en plus de 60 langues pour entreprises et institutions. Assurez-vous que chaque utilisateur puisse comprendre ces nouvelles règles et fonctionnalités, peu importe sa langue d'origine !
Description
What
User experience
What type of Android issue is this?
Camera
What steps would let us observe this issue?
What did you expect to happen?
The quality of images and lenses and their processing should improve, especially since I have not tried them in difficult conditions. They are just normal photos during the day.
What actually happened?
The quality of the images has become lower, the processing is worse, and the sharpness is lower, and you can see this easily by simply comparing any close-up image with the zoom lens in Android 14 and 15 on my Pixel 6 Pro
What was the effect of this issue on your device usage, such as lost time or work?
High
When
Time and frequency
How often has this happened?
Every time
Where
Component
Originating component:
Suggested component: <not visible> (1498455)
Build and device data
- Build Number: google/raven_beta/raven:VanillaIceCream/AP31.240426.023/11830707:user/release-keys
(Note: It is the build when sending this report. For exact build reference, please see the attached bugreport.)
Debugging information
Google Play services
com.google.android.gms
Version 242013038 (24.20.13 (190400-633713831))
System App (Updated)
Android System WebView
com.google.android.webview
Version 636758231 (124.0.6367.82)
System App (Updated)
Network operator: Orange EG
SIM operator: Orange EG
Filed by Android Beta Feedback. Version (Updated): 2.42-betterbug.external_20240410_RC03 (DOGFOOD)https://developer.android.com/preview/feedback#feedback-app .
To learn more about our feedback process, please visit