From b086ebaeae8ed3ccc9f909e81930a930c8401ed4 Mon Sep 17 00:00:00 2001 From: Kosh Date: Tue, 18 Apr 2017 00:04:47 +0800 Subject: [PATCH] released 1.9.1 fixing push event icon bug in lollipop. --- app/build.gradle | 4 ++-- .../ui/adapter/IssuePullsTimelineAdapter.java | 6 +++++- .../TimelineCommentsViewHolder.java | 20 ++++++++++++------- app/src/main/res/drawable/ic_push.xml | 9 ++++----- app/src/main/res/raw/changelog.html | 2 ++ app/src/main/res/values/arrays.xml | 4 ++-- 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a18480fcd..bf7736376 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,8 +32,8 @@ android { applicationId "com.fastaccess.github" minSdkVersion 21 targetSdkVersion 25 - versionCode 190 - versionName "1.9.0" + versionCode 191 + versionName "1.9.1" signingConfig signingConfigs.signing 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/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java index b38a54fb1..8c77326db 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java @@ -80,10 +80,10 @@ public IssuePullsTimelineAdapter(@NonNull List data, OnToggleView } @Override public void onViewDetachedFromWindow(BaseViewHolder holder) { - super.onViewDetachedFromWindow(holder); if (holder instanceof TimelineCommentsViewHolder) { ((TimelineCommentsViewHolder) holder).pauseWebView(); } + super.onViewDetachedFromWindow(holder); } @Override public void onViewAttachedToWindow(BaseViewHolder holder) { @@ -93,5 +93,9 @@ public IssuePullsTimelineAdapter(@NonNull List data, OnToggleView } } + @Override public void insertItems(@NonNull List items) { + super.insertItems(items); + } + } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java index 34ef448a7..2741764a9 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java @@ -15,12 +15,12 @@ import com.fastaccess.helper.InputHelper; import com.fastaccess.helper.ParseDateFormat; import com.fastaccess.provider.comments.CommentsHelper; +import com.fastaccess.ui.adapter.IssuePullsTimelineAdapter; import com.fastaccess.ui.adapter.callback.OnToggleView; import com.fastaccess.ui.adapter.callback.ReactionsCallback; import com.fastaccess.ui.widgets.AvatarLayout; import com.fastaccess.ui.widgets.FontTextView; import com.fastaccess.ui.widgets.SpannableBuilder; -import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; import com.prettifier.pretty.PrettifyWebView; @@ -54,6 +54,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder { private OnToggleView onToggleView; private boolean showEmojies; private ReactionsCallback reactionsCallback; + private boolean isPaused; @Override public void onClick(View v) { if (v.getId() == R.id.toggle || v.getId() == R.id.toggleHolder || v.getId() == R.id.reactionsText) { @@ -103,7 +104,7 @@ private void addReactionCount(View v) { } } - private TimelineCommentsViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter, + private TimelineCommentsViewHolder(@NonNull View itemView, @Nullable IssuePullsTimelineAdapter adapter, @NonNull String login, @NonNull OnToggleView onToggleView, boolean showEmojies, @NonNull ReactionsCallback reactionsCallback) { super(itemView, adapter); @@ -132,7 +133,7 @@ private TimelineCommentsViewHolder(@NonNull View itemView, @Nullable BaseRecycle reactionsText.setOnClickListener(this); } - public static TimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter, + public static TimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable IssuePullsTimelineAdapter adapter, @NonNull String login, @NonNull OnToggleView onToggleView, boolean showEmojies, @NonNull ReactionsCallback reactionsCallback) { return new TimelineCommentsViewHolder(getView(viewGroup, R.layout.comments_row_item), adapter, login, @@ -148,7 +149,7 @@ public static TimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGrou } else { avatar.setUrl(null, null); } - if (!InputHelper.isEmpty(commentsModel.getBodyHtml())) { + if (!InputHelper.isEmpty(commentsModel.getBodyHtml()) && !isPaused) { comment.setNestedScrollingEnabled(false); comment.setGithubContent(commentsModel.getBodyHtml(), null, true); } @@ -243,12 +244,17 @@ private void onToggle(boolean expanded) { } } - public void pauseWebView() { - if (comment != null) comment.onPause(); + if (comment != null) { + comment.onPause(); + isPaused = true; + } } public void resumeWebView() { - if (comment != null) comment.onResume(); + if (comment != null) { + comment.onResume(); + isPaused = false; + } } } diff --git a/app/src/main/res/drawable/ic_push.xml b/app/src/main/res/drawable/ic_push.xml index 08efc1fe1..f08cb3b8b 100644 --- a/app/src/main/res/drawable/ic_push.xml +++ b/app/src/main/res/drawable/ic_push.xml @@ -1,11 +1,10 @@ - + - + android:viewportHeight="24" + android:viewportWidth="24"> + android:pathData="M17,12C17,14.42 15.28,16.44 13,16.9V21H11V16.9C8.72,16.44 7,14.42 7,12C7,9.58 8.72,7.56 11,7.1V3H13V7.1C15.28,7.56 17,9.58 17,12M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9Z"/> \ No newline at end of file diff --git a/app/src/main/res/raw/changelog.html b/app/src/main/res/raw/changelog.html index ee3ba07e5..332485bbe 100644 --- a/app/src/main/res/raw/changelog.html +++ b/app/src/main/res/raw/changelog.html @@ -16,6 +16,8 @@

Ve

Bugs , Enhancements & new features

    +
  • (Fix 1.9.1) Push icon crashes app (Android Lollipop Bug)#androidstuff.
  • +
  • (Fix 1.9.1) Clicking home up from issue/pr doesn't go to the associated tab.
  • (New) German & Turkish language support.
  • (New) Loading all comments at once & added fastscroller to scroll to bottom faster.
  • (New) Long press on reaction see who reacted to it.
  • diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 63198dff1..5a5a88d50 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -64,8 +64,8 @@ English - Germany - Turkey + German + Turkish