Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
released 1.9.1 fixing push event icon bug in lollipop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosh committed Apr 17, 2017
1 parent 33de966 commit b086eba
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public IssuePullsTimelineAdapter(@NonNull List<TimelineModel> 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) {
Expand All @@ -93,5 +93,9 @@ public IssuePullsTimelineAdapter(@NonNull List<TimelineModel> data, OnToggleView
}
}

@Override public void insertItems(@NonNull List<TimelineModel> items) {
super.insertItems(items);
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -54,6 +54,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder<TimelineModel> {
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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
}
}
}
9 changes: 4 additions & 5 deletions app/src/main/res/drawable/ic_push.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="16.0"
android:viewportWidth="14.0">

android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="?icon_color"
android:pathData="M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z"/>
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"/>
</vector>
2 changes: 2 additions & 0 deletions app/src/main/res/raw/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ <h3><a id="Version__190__Markdown_Editor_Image_upload_using_Imgur_API__2"></a>Ve
</blockquote>
<h4><a id="Bugs__Enhacements__new_features_6"></a>Bugs , Enhancements &amp; new features</h4>
<ul>
<li>(Fix 1.9.1) Push icon crashes app (Android Lollipop Bug)<small>#androidstuff</small>.</li>
<li>(Fix 1.9.1) Clicking home up from issue/pr doesn't go to the associated tab.</li>
<li>(New) German &amp; Turkish language support.</li>
<li>(New) Loading all comments at once &amp; added fastscroller to scroll to bottom faster.</li>
<li>(New) Long press on reaction see who reacted to it.</li>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@

<string-array name="languages_array" translatable="false">
<item>English</item>
<item>Germany</item>
<item>Turkey</item>
<item>German</item>
<item>Turkish</item>
</string-array>

<string-array name="languages_array_values" translatable="false">
Expand Down

0 comments on commit b086eba

Please sign in to comment.