mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 11:17:25 +01:00
Minor bugs fixed in ParsePost.
This commit is contained in:
parent
b0d9a15dfd
commit
c809de6350
@ -1260,8 +1260,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
|||||||
mFetchPostInfoLinearLayout.setOnClickListener(view -> refresh());
|
mFetchPostInfoLinearLayout.setOnClickListener(view -> refresh());
|
||||||
showErrorView(R.string.load_posts_error);
|
showErrorView(R.string.load_posts_error);
|
||||||
}
|
}
|
||||||
if (!(refreshLoadState instanceof LoadState.Loading) // #563
|
if (!(refreshLoadState instanceof LoadState.Loading) && appendLoadState instanceof LoadState.NotLoading) {
|
||||||
&& appendLoadState instanceof LoadState.NotLoading) {
|
|
||||||
if (appendLoadState.getEndOfPaginationReached() && mAdapter.getItemCount() < 1) {
|
if (appendLoadState.getEndOfPaginationReached() && mAdapter.getItemCount() < 1) {
|
||||||
noPostFound();
|
noPostFound();
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,7 @@ public class ParsePost {
|
|||||||
galleryItemCaptionUrl = galleryItem.getString(JSONUtils.CAPTION_URL_KEY).trim();
|
galleryItemCaptionUrl = galleryItem.getString(JSONUtils.CAPTION_URL_KEY).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((previews.isEmpty()) && mimeType.contains("jpg") || mimeType.contains("png")) {
|
if (previews.isEmpty() && (mimeType.contains("jpg") || mimeType.contains("png"))) {
|
||||||
previews.add(new Post.Preview(galleryItemUrl, singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.X_KEY),
|
previews.add(new Post.Preview(galleryItemUrl, singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.X_KEY),
|
||||||
singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.Y_KEY), galleryItemCaption, galleryItemCaptionUrl));
|
singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.Y_KEY), galleryItemCaption, galleryItemCaptionUrl));
|
||||||
}
|
}
|
||||||
|
@ -150,8 +150,9 @@ public class Utils {
|
|||||||
|
|
||||||
public static CharSequence trimTrailingWhitespace(CharSequence source) {
|
public static CharSequence trimTrailingWhitespace(CharSequence source) {
|
||||||
|
|
||||||
if(source == null)
|
if (source == null) {
|
||||||
return "";
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
int i = source.length();
|
int i = source.length();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user