From e9fe4a82df33273703e56d82d259b64fd26bb6f2 Mon Sep 17 00:00:00 2001 From: Poussinou Date: Sun, 4 Dec 2022 05:26:19 +0930 Subject: [PATCH 1/4] Update README.md --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 326d74f52..9508321b9 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,17 @@ Mastodon for Android [![Crowdin](https://badges.crowdin.net/mastodon-for-android/localized.svg)](https://crowdin.com/project/mastodon-for-android) - - This is the repository for the official Android app for Mastodon. +[Get it on F-Droid](https://f-droid.org/packages/org.joinmastodon.android/) +[Get it on Google Play](https://play.google.com/store/apps/details?id=org.joinmastodon.android) + +or get the APK from the [The Releases Section](https://github.com/mastodon/mastodon-android/releases/latest). + ## Contributing Our goal is delivering a polished, professionally designed and user-friendly app. We proceed according to wireframes provided by a professional UX designer that works with Mastodon gGmbH. This means that any outside contributions that change the app visually must first be coordinated with the UX designer. *This can take time.* Furthermore, we work off of an internal roadmap and aim for feature-parity and consistency with our iOS app. The iOS app is designated as the "primary" between the two, therefore, if you want to request features, please do so in the [Mastodon for iOS](https://github.com/mastodon/mastodon-ios) repository, as you are requesting a feature to be both in iOS and Android (exceptions being system integrations specific to Android). On the other hand, any contributions that improve existing functionality, performance, or accessibility should not have any roadblocks to being merged. From 0dcdda75bec07597eb2b2eeb4bd2fe349c3b769c Mon Sep 17 00:00:00 2001 From: Poussinou Date: Thu, 8 Dec 2022 12:45:28 +0930 Subject: [PATCH 2/4] fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9508321b9..2f062e8fd 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is the repository for the official Android app for Mastodon. alt="Get it on Google Play" height="80">](https://play.google.com/store/apps/details?id=org.joinmastodon.android) -or get the APK from the [The Releases Section](https://github.com/mastodon/mastodon-android/releases/latest). +Or get the APK from the [The Releases Section](https://github.com/mastodon/mastodon-android/releases/latest). ## Contributing From 1764e5f3d1176c6e7eff55a08a37d38e3e5c1946 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 15 Jan 2023 11:09:53 +0300 Subject: [PATCH 3/4] Paginate trending posts --- .../android/api/requests/trends/GetTrendingStatuses.java | 4 +++- .../android/fragments/discover/DiscoverPostsFragment.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/requests/trends/GetTrendingStatuses.java b/mastodon/src/main/java/org/joinmastodon/android/api/requests/trends/GetTrendingStatuses.java index b902563c2..ea781d716 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/requests/trends/GetTrendingStatuses.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/requests/trends/GetTrendingStatuses.java @@ -8,9 +8,11 @@ import org.joinmastodon.android.model.Status; import java.util.List; public class GetTrendingStatuses extends MastodonAPIRequest>{ - public GetTrendingStatuses(int limit){ + public GetTrendingStatuses(int offset, int limit){ super(HttpMethod.GET, "/trends/statuses", new TypeToken<>(){}); if(limit>0) addQueryParameter("limit", ""+limit); + if(offset>0) + addQueryParameter("offset", ""+offset); } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverPostsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverPostsFragment.java index c79b51203..ebf8b7620 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverPostsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverPostsFragment.java @@ -17,11 +17,11 @@ public class DiscoverPostsFragment extends StatusListFragment{ @Override protected void doLoadData(int offset, int count){ - currentRequest=new GetTrendingStatuses(count) + currentRequest=new GetTrendingStatuses(offset, count) .setCallback(new SimpleCallback<>(this){ @Override public void onSuccess(List result){ - onDataLoaded(result, false); + onDataLoaded(result, !result.isEmpty()); } }).exec(accountID); } From 6e6fdbccd5344b2d74cc67cf051f3a9792f8ef54 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 15 Jan 2023 11:40:06 +0300 Subject: [PATCH 4/4] Fix #484 --- .../org/joinmastodon/android/fragments/ComposeFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index e47e2243b..6ebeb01d7 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -526,7 +526,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr DraftMediaAttachment da=new DraftMediaAttachment(); da.serverAttachment=att; da.description=att.description; - da.uri=Uri.parse(att.previewUrl); + da.uri=att.previewUrl!=null ? Uri.parse(att.previewUrl) : null; da.state=AttachmentUploadState.DONE; attachmentsView.addView(createMediaAttachmentView(da)); attachments.add(da); @@ -919,7 +919,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr View thumb=getActivity().getLayoutInflater().inflate(R.layout.compose_media_thumb, attachmentsView, false); ImageView img=thumb.findViewById(R.id.thumb); if(draft.serverAttachment!=null){ - ViewImageLoader.load(img, draft.serverAttachment.blurhashPlaceholder, new UrlImageLoaderRequest(draft.serverAttachment.previewUrl, V.dp(250), V.dp(250))); + if(draft.serverAttachment.previewUrl!=null) + ViewImageLoader.load(img, draft.serverAttachment.blurhashPlaceholder, new UrlImageLoaderRequest(draft.serverAttachment.previewUrl, V.dp(250), V.dp(250))); }else{ if(draft.mimeType.startsWith("image/")){ ViewImageLoader.load(img, null, new UrlImageLoaderRequest(draft.uri, V.dp(250), V.dp(250)));