From e66d3ac7fbc35e776c1a7de0b30f2a72ce78227e Mon Sep 17 00:00:00 2001 From: stom79 Date: Wed, 2 Jan 2019 14:47:33 +0100 Subject: [PATCH] Fix issue #687 --- .../activities/ShowAccountActivity.java | 7 ++++-- .../res/drawable-hdpi/ic_hourglass_full.png | Bin 0 -> 146 bytes .../res/drawable-ldpi/ic_hourglass_full.png | Bin 0 -> 254 bytes .../res/drawable-mdpi/ic_hourglass_full.png | Bin 0 -> 120 bytes .../res/drawable-xhdpi/ic_hourglass_full.png | Bin 0 -> 133 bytes .../res/drawable-xxhdpi/ic_hourglass_full.png | Bin 0 -> 219 bytes .../drawable-xxxhdpi/ic_hourglass_full.png | Bin 0 -> 216 bytes app/src/main/res/drawable/green_border.xml | 11 ++++++++++ .../main/res/layout/activity_show_account.xml | 20 +++++++++--------- 9 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable-ldpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable-mdpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_hourglass_full.png create mode 100644 app/src/main/res/drawable/green_border.xml diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java index 2a749cdb8..5f15a4647 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java @@ -46,6 +46,7 @@ import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.ForegroundColorSpan; import android.text.style.UnderlineSpan; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -805,6 +806,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt private void manageButtonVisibility(){ if( relationship == null) return; + Log.v(Helper.TAG,"relationship.isRequested()= " + relationship.isRequested()); account_follow.setEnabled(true); if( account.getId() != null && account.getId().equals(userId)){ account_follow.hide(); @@ -816,8 +818,9 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt account_follow.show(); }else if( relationship.isRequested()){ account_follow_request.setVisibility(View.VISIBLE); - account_follow.hide(); - doAction = action.NOTHING; + account_follow.setImageResource(R.drawable.ic_hourglass_full); + account_follow.show(); + doAction = action.UNFOLLOW; }else if( relationship.isFollowing()){ account_follow.setImageResource(R.drawable.ic_user_times); doAction = action.UNFOLLOW; diff --git a/app/src/main/res/drawable-hdpi/ic_hourglass_full.png b/app/src/main/res/drawable-hdpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..76f3c9cd616ce0f3db9fa9f0f39385ff20af8647 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^(jd&i0wmS%+S~(Dk)AG&Ar-fh6C?~i+<)+&an1#X z?Pl%&cQhVeVJ5Vt@X!55=gWQnWqu^_?RNV!s~|&V4QIF8Ba=o`u0Q`7u6}vApJC&y v6B~PV_D>X@lydBL2H%2NW}m$DW-&7y7q)ZXp-?#iXbFR-tDnm{r-UW|wq-dZ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-ldpi/ic_hourglass_full.png b/app/src/main/res/drawable-ldpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..0ed2cf75761940987efa361697d2c39b3930058c GIT binary patch literal 254 zcmV#1~Mj-m?`H@7(L)q=R73KTsi8dvXRoN}BwnNh1Wa zx~?;jgFb`&OvEOo>{)B2_kIaVZ~;{~&tQf4kn$QL=iCTE1Mc9(cz_+n+eDj?#EtxI zN+eKzfZz;VBN6!vic?<0lv32!7zqWqg{RS3&^^UP%Cy!wo-sk<5j?>O{*>;M0#@nJ zsZxiY=3hOr>8)F)XMT;`grxYN_DNA-pgxqFo~8f`~Uy|07*qoM6N<$ Eg4UOBtpET3 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_hourglass_full.png b/app/src/main/res/drawable-mdpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..eab34e177584d7d50e4146beea02eb1c86930f3e GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m>^)r^Ln>}1Cn&J~DgSZ5flbyx z)bx)#J1_G(kB9%6MO69!X(xP^-(>X0D`3jQFsCU>N^6u)J#02Q(&?%7gMnd%B!>!1 SP0miBQ4F50elF{r5}E+uU?s%> literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_hourglass_full.png b/app/src/main/res/drawable-xhdpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..3436e4d94bfca59b3ef6d37b3658c80d2bc61cf2 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;kEe@cNX4zUSGqYF6nLBu_RTw6 z%9N?iFX+o=@xuJk@*XE1Nh@~E(vZ8kiat&&s|%fGur9r8uh4Q(VTH+xn-_j8Y(3(4 gmdKI;Vst0C@T>1^@s6 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_hourglass_full.png b/app/src/main/res/drawable-xxhdpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..5989a20cf1c9eee355ad391e1cfee767463f4a17 GIT binary patch literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL0wmRZ7KH(+MV>B>Ar-gY-nhuypuoctP{#1B z(CARdD<{)M^IbADduLg*Rd8m`UUp8=o=bNMYyQNFFE8g3*S;gO>eSiAK8A<$*91+@GPIlW zZ`tkCjTf&}#Z2C{Bf<4$!QCqs#}}P@lho(iTd<9re_BYwfreU^%{EgM_0KXksM)(e TOmpc1x|YGy)z4*}Q$iB}Gfq~5 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_hourglass_full.png b/app/src/main/res/drawable-xxxhdpi/ic_hourglass_full.png new file mode 100644 index 0000000000000000000000000000000000000000..557dcb9a5e702de26722e4430925c50fd40b8264 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw=6kw0hE&{od%cnKfC3Ne#Xh;x z4`MM3q$Ym}ey3Kkz@<3WMdgC5h=M}{10xd)hrojSO>Q0OE_F%gJ#Bx*+b*$~eC6(( zXjW&AkJ)k+)X_@JA z-&ZehJV}`>GskDr + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_show_account.xml b/app/src/main/res/layout/activity_show_account.xml index 5a2f10cf7..3e46d7ce1 100644 --- a/app/src/main/res/layout/activity_show_account.xml +++ b/app/src/main/res/layout/activity_show_account.xml @@ -173,30 +173,30 @@ + android:orientation="vertical">