Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing social icons #21492

Merged
merged 9 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ enum class PublicizeServiceIcon(
val serviceId: String,
@DrawableRes val iconResId: Int,
) {
BLUESKY("bluesky", R.drawable.ic_social_bluesky),
FACEBOOK("facebook", R.drawable.ic_social_facebook),
INSTAGRAM("instagram-business", R.drawable.ic_social_instagram),
LINKEDIN("linkedin", R.drawable.ic_social_linkedin),
MASTODON("mastodon", R.drawable.ic_social_mastodon),
NEXTDOOR("nextdoor", R.drawable.ic_social_nextdoor),
THREADS("threads", R.drawable.ic_social_threads),
TUMBLR("tumblr", R.drawable.ic_social_tumblr),
TWITTER("twitter", R.drawable.ic_social_twitter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,19 @@ public void onBindViewHolder(final SharingViewHolder holder, int position) {
holder.mTxtService.setText(service.getLabel());
final PublicizeServiceIcon icon = PublicizeServiceIcon.fromServiceId(service.getId());
if (icon != null) {
holder.mImgIcon.setVisibility(View.VISIBLE);
mImageManager.load(holder.mImgIcon, icon.getIconResId());
} else {
holder.mImgIcon.setVisibility(View.INVISIBLE);
holder.mImgIcon.setImageResource(R.drawable.ic_social_generic);
}

if (connections.size() > 0) {
holder.mTxtUser.setText(connections.getUserDisplayNames());
holder.mTxtUser.setVisibility(View.VISIBLE);
String userNames = connections.getUserDisplayNames();
if (userNames.isEmpty()) {
holder.mTxtUser.setVisibility(View.GONE);
} else {
holder.mTxtUser.setText(connections.getUserDisplayNames());
holder.mTxtUser.setVisibility(View.VISIBLE);
}
holder.mImgIcon.clearColorFilter();
holder.mImgIcon.setImageAlpha(255);
} else {
Expand Down Expand Up @@ -200,6 +205,7 @@ protected Boolean doInBackground(Void... params) {
return !(mTmpServices.isSameAs(mServices) && mTmpConnections.isSameAs(mConnections));
}

@SuppressLint("NotifyDataSetChanged")
@Override
protected void onPostExecute(Boolean result) {
if (result) {
Expand Down
13 changes: 13 additions & 0 deletions WordPress/src/main/res/drawable-night/ic_social_threads.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="124dp"
android:height="141dp"
android:viewportHeight="141"
android:viewportWidth="124">
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M63.09,141L63.05,141C41.97,140.86 25.77,133.92 14.89,120.39C5.21,108.33 0.21,91.57 0.04,70.55L0.04,70.46C0.21,49.43 5.21,32.68 14.9,20.63C25.77,7.08 41.99,0.14 63.05,0L63.13,0C79.29,0.11 92.8,4.26 103.3,12.32C113.17,19.91 120.12,30.71 123.95,44.44L111.94,47.79C105.44,24.52 89,12.63 63.07,12.45C45.96,12.58 33,17.95 24.59,28.41C16.72,38.21 12.65,52.37 12.5,70.5C12.65,88.63 16.72,102.79 24.6,112.59C33.02,123.07 45.97,128.44 63.09,128.55C78.52,128.44 88.73,124.84 97.22,116.54C106.91,107.06 106.74,95.43 103.63,88.35C101.81,84.18 98.49,80.71 94.02,78.07C92.89,86.01 90.36,92.44 86.46,97.29C81.25,103.76 73.86,107.3 64.52,107.81C57.44,108.19 50.62,106.53 45.34,103.1C39.08,99.05 35.42,92.88 35.02,85.69C34.64,78.69 37.43,72.26 42.85,67.58C48.03,63.11 55.32,60.49 63.93,60C70.28,59.64 76.22,59.93 81.7,60.83C80.97,56.47 79.5,53 77.3,50.51C74.27,47.07 69.6,45.32 63.41,45.27C63.36,45.27 63.3,45.27 63.24,45.27C58.27,45.27 51.52,46.64 47.23,53.03L36.89,46.11C42.65,37.56 52,32.85 63.24,32.85C63.33,32.85 63.41,32.85 63.5,32.85C82.29,32.96 93.5,44.46 94.61,64.51C95.25,64.78 95.88,65.06 96.5,65.34C105.27,69.46 111.68,75.69 115.06,83.38C119.75,94.07 120.19,111.52 105.95,125.43C95.06,136.07 81.86,140.88 63.13,141ZM68.99,72.32C67.57,72.32 66.13,72.36 64.64,72.45C53.84,73.05 47.1,78 47.48,85.04C47.88,92.41 56.03,95.84 63.86,95.41C71.07,95.04 80.45,92.23 82.03,73.62C78.04,72.76 73.68,72.32 68.99,72.32ZM68.99,72.32"
android:strokeColor="#FFFFFF"
tools:ignore="VectorPath" />
</vector>
11 changes: 11 additions & 0 deletions WordPress/src/main/res/drawable/ic_social_bluesky.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Show resolved Hide resolved
android:height="256dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M87.77,78.77C104.05,91 121.57,115.77 128,129.07C134.43,115.77 151.95,91 168.23,78.77C179.98,69.95 199,63.13 199,84.85C199,89.18 196.5,121.27 195.05,126.48C189.98,144.6 171.52,149.23 155.07,146.43C183.82,151.3 191.1,167.5 175.32,183.68C145.38,214.43 132.27,175.98 128.9,166.13C128.3,164.32 128,163.48 128,164.18C128,163.48 127.7,164.32 127.1,166.13C123.73,175.98 110.63,214.45 80.68,183.7C64.9,167.5 72.18,151.3 100.93,146.43C84.48,149.23 66.02,144.6 60.93,126.48C59.5,121.27 57,89.18 57,84.85C57,63.13 76.02,69.95 87.77,78.77ZM87.77,78.77"
android:fillColor="#1185FE"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
7 changes: 7 additions & 0 deletions WordPress/src/main/res/drawable/ic_social_generic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="?attr/colorOnSurface"
android:pathData="M15.5,9.5a1,1 0,1 0,0 -2,1 1,0 0,0 0,2zM15.5,11a2.5,2.5 0,1 0,0 -5,2.5 2.5,0 0,0 0,5zM13.25,17v-2a2.75,2.75 0,0 0,-2.75 -2.75h-4A2.75,2.75 0,0 0,3.75 15v2h1.5v-2c0,-0.69 0.56,-1.25 1.25,-1.25h4c0.69,0 1.25,0.56 1.25,1.25v2h1.5zM20.25,15v2h-1.5v-2c0,-0.69 -0.56,-1.25 -1.25,-1.25L15,13.75v-1.5h2.5A2.75,2.75 0,0 1,20.25 15zM9.5,8.5a1,1 0,1 1,-2 0,1 1,0 0,1 2,0zM11,8.5a2.5,2.5 0,1 1,-5 0,2.5 2.5,0 0,1 5,0z"/>
</vector>
9 changes: 9 additions & 0 deletions WordPress/src/main/res/drawable/ic_social_nextdoor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M2.5,3.8c-0.4,0 -0.8,0.3 -0.8,0.7v3c0,2.3 2,4.3 4.3,4.3h0.8v7.7c0,0.4 0.3,0.8 0.7,0.8h4c0.4,0 0.8,-0.4 0.8,-0.8v-8a2.3,2.3 0,0 1,4.4 0v8c0,0.4 0.4,0.8 0.8,0.8h4c0.4,0 0.8,-0.4 0.8,-0.8v-8A7.8,7.8 0,0 0,8 7.2a0.8,0.8 0,0 1,-0.8 -0.7v-2c0,-0.4 -0.3,-0.8 -0.7,-0.8h-4Z"
android:fillColor="#8BC94D"/>
</vector>
13 changes: 13 additions & 0 deletions WordPress/src/main/res/drawable/ic_social_threads.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="124dp"
android:height="141dp"
android:viewportHeight="141"
android:viewportWidth="124">
<path
android:fillColor="#000000"
android:fillType="nonZero"
android:pathData="M63.09,141L63.05,141C41.97,140.86 25.77,133.92 14.89,120.39C5.21,108.33 0.21,91.57 0.04,70.55L0.04,70.46C0.21,49.43 5.21,32.68 14.9,20.63C25.77,7.08 41.99,0.14 63.05,0L63.13,0C79.29,0.11 92.8,4.26 103.3,12.32C113.17,19.91 120.12,30.71 123.95,44.44L111.94,47.79C105.44,24.52 89,12.63 63.07,12.45C45.96,12.58 33,17.95 24.59,28.41C16.72,38.21 12.65,52.37 12.5,70.5C12.65,88.63 16.72,102.79 24.6,112.59C33.02,123.07 45.97,128.44 63.09,128.55C78.52,128.44 88.73,124.84 97.22,116.54C106.91,107.06 106.74,95.43 103.63,88.35C101.81,84.18 98.49,80.71 94.02,78.07C92.89,86.01 90.36,92.44 86.46,97.29C81.25,103.76 73.86,107.3 64.52,107.81C57.44,108.19 50.62,106.53 45.34,103.1C39.08,99.05 35.42,92.88 35.02,85.69C34.64,78.69 37.43,72.26 42.85,67.58C48.03,63.11 55.32,60.49 63.93,60C70.28,59.64 76.22,59.93 81.7,60.83C80.97,56.47 79.5,53 77.3,50.51C74.27,47.07 69.6,45.32 63.41,45.27C63.36,45.27 63.3,45.27 63.24,45.27C58.27,45.27 51.52,46.64 47.23,53.03L36.89,46.11C42.65,37.56 52,32.85 63.24,32.85C63.33,32.85 63.41,32.85 63.5,32.85C82.29,32.96 93.5,44.46 94.61,64.51C95.25,64.78 95.88,65.06 96.5,65.34C105.27,69.46 111.68,75.69 115.06,83.38C119.75,94.07 120.19,111.52 105.95,125.43C95.06,136.07 81.86,140.88 63.13,141ZM68.99,72.32C67.57,72.32 66.13,72.36 64.64,72.45C53.84,73.05 47.1,78 47.48,85.04C47.88,92.41 56.03,95.84 63.86,95.41C71.07,95.04 80.45,92.23 82.03,73.62C78.04,72.76 73.68,72.32 68.99,72.32ZM68.99,72.32"
android:strokeColor="#00000000"
tools:ignore="VectorPath" />
</vector>