diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
index bf30eac5d..c00dce6c4 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java
@@ -120,6 +120,7 @@ import fr.gouv.etalab.mastodon.sqlite.TempMuteDAO;
import static fr.gouv.etalab.mastodon.activities.MainActivity.currentLocale;
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK;
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
+import static fr.gouv.etalab.mastodon.helper.Helper.THEME_LIGHT;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
@@ -416,7 +417,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
boolean displayBookmarkButton = sharedpreferences.getBoolean(Helper.SET_SHOW_BOOKMARK, true);
boolean fullAttachement = sharedpreferences.getBoolean(Helper.SET_FULL_PREVIEW, false);
- if( type != RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && getItemViewType(position) != COMPACT_STATUS && displayBookmarkButton)
+ if( type != RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && getItemViewType(position) == FOCUSED_STATUS && displayBookmarkButton)
holder.status_bookmark.setVisibility(View.VISIBLE);
else
holder.status_bookmark.setVisibility(View.GONE);
@@ -692,20 +693,23 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
//Change the color in gray for accounts in DARK Theme only
Spannable wordtoSpan = status.getDisplayNameSpan();
- if( theme == THEME_DARK || theme == Helper.THEME_BLACK) {
- Pattern hashAcct;
- if( status.getReblog() != null)
- hashAcct = Pattern.compile("\\s(@"+status.getReblog().getAccount().getAcct()+")");
- else
- hashAcct = Pattern.compile("(@"+status.getAccount().getAcct()+")");
- if( wordtoSpan != null && hashAcct != null){
- Matcher matcherAcct = hashAcct.matcher(wordtoSpan);
- while (matcherAcct.find()){
- int matchStart = matcherAcct.start(1);
- int matchEnd = matcherAcct.end();
- if( wordtoSpan.length() >= matchEnd && matchStart < matchEnd)
+ Pattern hashAcct;
+ if( status.getReblog() != null)
+ hashAcct = Pattern.compile("\\s(@"+status.getReblog().getAccount().getAcct()+")");
+ else
+ hashAcct = Pattern.compile("(@"+status.getAccount().getAcct()+")");
+ if( wordtoSpan != null && hashAcct != null){
+ Matcher matcherAcct = hashAcct.matcher(wordtoSpan);
+ while (matcherAcct.find()){
+ int matchStart = matcherAcct.start(1);
+ int matchEnd = matcherAcct.end();
+ if( wordtoSpan.length() >= matchEnd && matchStart < matchEnd){
+ if( theme == THEME_LIGHT)
wordtoSpan.setSpan(new ForegroundColorSpan(ContextCompat.getColor(context, R.color.dark_icon)), matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
+ else
+ wordtoSpan.setSpan(new ForegroundColorSpan(ContextCompat.getColor(context, R.color.mastodonC2)), matchStart, matchEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
}
+
}
}
holder.status_account_username.setText(wordtoSpan);
diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml
index b4bd68eac..49fc9574c 100644
--- a/app/src/main/res/layout/drawer_status.xml
+++ b/app/src/main/res/layout/drawer_status.xml
@@ -20,6 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/main_container"
+ android:layout_marginTop="10dp"
android:divider="?android:dividerHorizontal"
android:showDividers="end"
android:orientation="vertical">
@@ -134,7 +135,6 @@
@@ -218,7 +218,7 @@
android:textAllCaps="false"
android:drawableLeft="@drawable/ic_remove_red_eye"
android:drawableStart="@drawable/ic_remove_red_eye"
- android:gravity="center"
+ android:gravity="center_vertical"
android:drawablePadding="5dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
@@ -227,7 +227,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:maxLines="1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:text="@string/load_attachment_spoiler" />
@@ -593,7 +593,7 @@
android:textAllCaps="false"
android:drawableLeft="@drawable/ic_photo"
android:drawableStart="@drawable/ic_photo"
- android:gravity="center"
+ android:gravity="center_vertical"
android:drawablePadding="5dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
@@ -602,7 +602,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:maxLines="1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:text="@string/load_attachment" />
@@ -619,82 +619,76 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
@@ -583,7 +583,7 @@
android:textAllCaps="false"
android:drawableLeft="@drawable/ic_photo"
android:drawableStart="@drawable/ic_photo"
- android:gravity="center"
+ android:gravity="center_vertical"
android:drawablePadding="5dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
@@ -592,7 +592,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:maxLines="1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:text="@string/load_attachment" />
diff --git a/app/src/main/res/layout/drawer_status_focused.xml b/app/src/main/res/layout/drawer_status_focused.xml
index c3c49dec6..98064b89b 100644
--- a/app/src/main/res/layout/drawer_status_focused.xml
+++ b/app/src/main/res/layout/drawer_status_focused.xml
@@ -119,7 +119,7 @@
android:textAllCaps="false"
android:drawableLeft="@drawable/ic_remove_red_eye"
android:drawableStart="@drawable/ic_remove_red_eye"
- android:gravity="center"
+ android:gravity="center_vertical"
android:drawablePadding="5dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
@@ -128,7 +128,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:maxLines="1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:text="@string/load_attachment_spoiler" />
@@ -509,7 +509,7 @@
android:textAllCaps="false"
android:drawableLeft="@drawable/ic_photo"
android:drawableStart="@drawable/ic_photo"
- android:gravity="center"
+ android:gravity="center_vertical"
android:drawablePadding="5dp"
android:paddingLeft="10dp"
android:paddingStart="10dp"
@@ -518,7 +518,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:maxLines="1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:text="@string/load_attachment" />