Add padding to SwipeRefresh for PostListings (for #400) #408
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request attempts to partially resolve the issue listed in #400 - I mention partially because from what I can tell, this occurs in two places:
PostListings
component)PostActivity
composable)I was able to fix the first occurrence by just simply passing in the padding from the parent
PostListings
component (assuming I'm using the correct phrasing here), but for the second occurrence that trick doesn't quite work as I can't really find a place to extract the padding from.While it would be possible to hardcode a padding value, that seems quite... hacky - and additionally, when I took a look at the screen from the Layout Inspector on two different devices (my Pixel 6a, and a Pixel 3a XL emulator) the top header was two different sizes. I presume this is because of "safe areas" due to some devices (like my 6a) having the camera notch/cut-out whereas some devices don't (such as the 3a XL).
I'm not sure what the elegant way of fixing the second occurrence would be since I still have a long way to go with learning Compose, but I figured I could at least toss my hat in for fixing the first occurrence if that's alright 👍🏼