Skip to content

Commit

Permalink
Revert "changed Publish button to row1, and View button to row 2"
Browse files Browse the repository at this point in the history
This reverts commit 74fc93a.
  • Loading branch information
mzorz committed Oct 27, 2017
1 parent 74fc93a commit 0c1b740
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ private void configurePostButtons(final PostViewHolder holder,

// edit / view are always visible
holder.btnEdit.setVisibility(View.VISIBLE);
holder.btnPublish.setVisibility(View.VISIBLE);
holder.btnView.setVisibility(View.VISIBLE);

// if we have enough room to show all buttons, hide the back/more buttons and show stats/trash/publish
if (mAlwaysShowAllButtons || numVisibleButtons <= 3) {
Expand All @@ -561,7 +561,7 @@ private void configurePostButtons(final PostViewHolder holder,
holder.btnBack.setVisibility(View.GONE);
holder.btnTrash.setVisibility(View.GONE);
holder.btnStats.setVisibility(View.GONE);
holder.btnView.setVisibility(View.GONE);
holder.btnPublish.setVisibility(View.GONE);
}

View.OnClickListener btnClickListener = new View.OnClickListener() {
Expand Down Expand Up @@ -615,11 +615,11 @@ public void onAnimationEnd(Animator animation) {

// row 1
holder.btnEdit.setVisibility(showRow1 ? View.VISIBLE : View.GONE);
holder.btnPublish.setVisibility(showRow1 && canPublishPost(post) ? View.VISIBLE : View.GONE);
holder.btnView.setVisibility(showRow1 ? View.VISIBLE : View.GONE);
holder.btnMore.setVisibility(showRow1 ? View.VISIBLE : View.GONE);
// row 2
holder.btnView.setVisibility(!showRow1 ? View.VISIBLE : View.GONE);
holder.btnStats.setVisibility(!showRow1 && canShowStatsForPost(post) ? View.VISIBLE : View.GONE);
holder.btnPublish.setVisibility(!showRow1 && canPublishPost(post) ? View.VISIBLE : View.GONE);
holder.btnTrash.setVisibility(!showRow1 ? View.VISIBLE : View.GONE);
holder.btnBack.setVisibility(!showRow1 ? View.VISIBLE : View.GONE);

Expand Down
8 changes: 4 additions & 4 deletions WordPress/src/main/res/layout/post_cardview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,20 @@
wp:wpPostButtonType="edit" />

<org.wordpress.android.widgets.PostListButton
android:id="@+id/btn_publish"
android:id="@+id/btn_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
wp:wpPostButtonType="publish" />
wp:wpPostButtonType="view" />

<org.wordpress.android.widgets.PostListButton
android:id="@+id/btn_view"
android:id="@+id/btn_publish"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
wp:wpPostButtonType="view" />
wp:wpPostButtonType="publish" />

<org.wordpress.android.widgets.PostListButton
android:id="@+id/btn_stats"
Expand Down

0 comments on commit 0c1b740

Please sign in to comment.