diff --git a/app/build.gradle b/app/build.gradle index 29c53768..3d74a745 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,7 +29,7 @@ android { applicationId "com.fastaccess.github" minSdkVersion 21 targetSdkVersion 29 - versionCode 470 + versionCode 471 versionName "4.7.0" buildConfigString "GITHUB_CLIENT_ID", (buildProperties.secrets['github_client_id'] | buildProperties.notThere['github_client_id']).string buildConfigString "GITHUB_SECRET", (buildProperties.secrets['github_secret'] | buildProperties.notThere['github_secret']).string diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 796c4f31..0ecf87ab 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -306,7 +306,6 @@ - showNotification(getNotification(reactionType), (int) commentId)) - .subscribe(response -> hideNotification((int) commentId), throwable -> hideNotification((int) commentId)); - } - - private void postCommit(@NonNull ReactionTypes reactionType, @NonNull String login, @NonNull String repo, long commentId, boolean isEnterprise) { - RxHelper.safeObservable(RestProvider.getReactionsService(isEnterprise) - .postCommitReaction(new PostReactionModel(reactionType.getContent()), login, repo, commentId)) - .doOnSubscribe(disposable -> showNotification(getNotification(reactionType), (int) commentId)) - .subscribe(response -> hideNotification((int) commentId), throwable -> hideNotification((int) commentId)); - } - - public NotificationCompat.Builder getNotification(@NonNull ReactionTypes reactionTypes) { - if (notification == null) { - notification = new NotificationCompat.Builder(this, "reaction") - .setSmallIcon(R.drawable.ic_sync) - .setProgress(0, 100, true); - } - notification.setContentTitle(getString(R.string.posting_reaction, reactionTypes.getContent())); - return notification; - } - - public NotificationManager getNotificationManager() { - if (notificationManager == null) { - notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); - } - return notificationManager; - } - - private void showNotification(@NonNull NotificationCompat.Builder builder, int id) { - getNotificationManager().notify(id, builder.build()); - } - - private void hideNotification(int id) { - getNotificationManager().cancel(id); - } -} diff --git a/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java b/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java index 727f3f49..9b9dba3f 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java @@ -1,28 +1,21 @@ package com.fastaccess.provider.timeline; -import android.content.Context; - -import androidx.annotation.IdRes; -import androidx.annotation.NonNull; - import android.view.View; import android.widget.TextView; import com.annimon.stream.Collectors; import com.annimon.stream.Stream; -import com.fastaccess.R; import com.fastaccess.data.dao.ReactionsModel; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.types.ReactionTypes; -import com.fastaccess.provider.tasks.git.ReactionService; import com.fastaccess.ui.widgets.SpannableBuilder; -import org.w3c.dom.Text; - import java.util.ArrayList; import java.util.List; +import androidx.annotation.NonNull; + /** * Created by Kosh on 30 Mar 2017, 6:44 PM */ diff --git a/app/src/main/java/com/fastaccess/provider/timeline/ReactionsProvider.java b/app/src/main/java/com/fastaccess/provider/timeline/ReactionsProvider.java index e185c5cc..ab93b529 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/ReactionsProvider.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/ReactionsProvider.java @@ -50,19 +50,19 @@ public class ReactionsProvider { switch (reactionType) { case COMMENT: observable = RestProvider.getReactionsService(isEnterprise) - .postIssueCommentReaction(new PostReactionModel(reactionTypes.getContent()), login, repoId, idOrNumber); + .postIssueCommentReaction(new PostReactionModel(reactionTypes.getPostContent()), login, repoId, idOrNumber); break; case HEADER: observable = RestProvider.getReactionsService(isEnterprise) - .postIssueReaction(new PostReactionModel(reactionTypes.getContent()), login, repoId, idOrNumber); + .postIssueReaction(new PostReactionModel(reactionTypes.getPostContent()), login, repoId, idOrNumber); break; case REVIEW_COMMENT: observable = RestProvider.getReactionsService(isEnterprise) - .postCommentReviewReaction(new PostReactionModel(reactionTypes.getContent()), login, repoId, idOrNumber); + .postCommentReviewReaction(new PostReactionModel(reactionTypes.getPostContent()), login, repoId, idOrNumber); break; case COMMIT: observable = RestProvider.getReactionsService(isEnterprise) - .postCommitReaction(new PostReactionModel(reactionTypes.getContent()), login, repoId, idOrNumber); + .postCommitReaction(new PostReactionModel(reactionTypes.getPostContent()), login, repoId, idOrNumber); break; } if (observable == null) return null; @@ -91,7 +91,7 @@ public class ReactionsProvider { return false; } ReactionTypes type = ReactionTypes.get(vId); - return type != null && type.getContent().equals(reactionsModel.getContent()); + return type != null && (type.getContent().equals(reactionsModel.getContent()) || type.getPostContent().equals(reactionsModel.getContent())); } public boolean isCallingApi(long id, int vId) { @@ -100,7 +100,8 @@ public class ReactionsProvider { return false; } ReactionTypes type = ReactionTypes.get(vId); - return type != null && type.getContent().equals(reactionsModel.getContent()) && reactionsModel.isCallingApi(); + return type != null && (type.getContent().equals(reactionsModel.getContent()) || type.getPostContent().equals(reactionsModel.getContent())) + && reactionsModel.isCallingApi(); } @NonNull private Map getReactionsMap() { diff --git a/app/src/main/res/raw/changelog.html b/app/src/main/res/raw/changelog.html index 056c8c18..b2782853 100644 --- a/app/src/main/res/raw/changelog.html +++ b/app/src/main/res/raw/changelog.html @@ -8,19 +8,20 @@

What’s new?

    -
  • Fix Trending (Finally, I KNOW!)
  • -
  • Fix Wiki (I know, I know…)
  • -
  • Migrate to Androidx
  • +
  • Added private Gist creation
  • +
  • Added Rocket & Eyes reactions
  • +
  • Added show file history to file menu (in addition to long click)
  • +
  • Fixed Downloading files on Android 9+
  • +
  • Fixed Thumbs up & down reaction listing
  • +
  • Fixed as a collaborator now you can add comments on locked issues/prs
  • +
  • Fixed crash in editing a comment in a gist
  • +
  • Remove shrug from empty states
  • +
  • Remove redundant unsubscribe button from notifications screen
  • +
  • Replace Send Feedback with a button to FastHub Repo (Issue Tab)
  • +
  • alot of other stuff I can’t remember!
-

I hear you asking (So what happened)?

-

Well, I was pretty much busy with life and work, but that’s not an excuse, I - know!. TBH with you all, I started working on FastHub v5 beginning of last year and I did actually made a good progress but then crisis - landed on me when my mom diagnosed with cancer and that really stroke me hard and demotivated me to even care about my own health, it - took awhile for me to recover and start accepting this fact and i’m still trying to figure out ways to motivate myself more to progress - on FastHub or anything in the Open Source Community.

-

TL;DR: this is just a bug fix version and I will continue to fix bugs until V5 is ready for shipment.

- -

Thank you to all who have contributed either via reporting bugs or via code contribution.

- +

I hear you asking (So what happened)?

+

Well, I was pretty much busy with life and work, but that’s not an excuse, I know!. TBH with you all, I started working on FastHub v5 beginning of last year and I did actually made a good progress but then crisis landed on me when my mom diagnostic with cancer and that really stroke me hard and demotivated me to even care about my own health, it took awhile for me to recover and start accepting this fact and i’m still trying to figure out way to motivate myself more to progress on FastHub or anything in the Open Source Community.

+

TL;DR: this is just a bug fix version and I will continue to fix bugs until V5 is ready for shipment.