Release 3.16.0
This commit is contained in:
parent
575329586f
commit
9683fee1e6
|
@ -13,8 +13,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 33
|
||||
versionCode 471
|
||||
versionName "3.15.2"
|
||||
versionCode 472
|
||||
versionName "3.16.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
flavorDimensions "default"
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
[
|
||||
{
|
||||
"version": "3.16.0",
|
||||
"code": "472",
|
||||
"note": "Changed:\n- Peertube support\n- Compose shortcut\n- Long press compose button to write with another account\n\nChanged:\n- Cross actions with two accounts display a dialog\n- Order & compact og values when sharing > title - url - content\n\nFixed:\n- Text cleared when adding a media\n- Fix crashes"
|
||||
},
|
||||
{
|
||||
"version": "3.15.2",
|
||||
"code": "471",
|
||||
|
|
|
@ -54,6 +54,8 @@ import android.webkit.WebView;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
@ -65,6 +67,8 @@ import com.bumptech.glide.RequestBuilder;
|
|||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -379,10 +383,36 @@ public class Helper {
|
|||
}
|
||||
try {
|
||||
RequestBuilder<Drawable> requestBuilder = Glide.with(imageView.getContext())
|
||||
.load(url)
|
||||
.thumbnail(0.1f);
|
||||
.load(url);
|
||||
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||
.into(imageView);
|
||||
.into(new CustomTarget<Drawable>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Drawable resource, Transition<? super Drawable> transition) {
|
||||
imageView.setImageDrawable(resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
super.onLoadFailed(errorDrawable);
|
||||
BitmapDrawable avatar = new AvatarGenerator.AvatarBuilder(context)
|
||||
.setLabel(channel.getAcct())
|
||||
.setAvatarSize(120)
|
||||
.setTextSize(30)
|
||||
.toSquare()
|
||||
.setBackgroundColor(fetchAccentColor(context))
|
||||
.build();
|
||||
Glide.with(imageView.getContext())
|
||||
.asDrawable()
|
||||
.load(avatar)
|
||||
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
BitmapDrawable avatar = new AvatarGenerator.AvatarBuilder(context)
|
||||
|
@ -429,7 +459,27 @@ public class Helper {
|
|||
} else {
|
||||
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(round)));
|
||||
}
|
||||
requestBuilder.into(imageView);
|
||||
requestBuilder.into(new CustomTarget<Drawable>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Drawable resource, Transition<? super Drawable> transition) {
|
||||
imageView.setImageDrawable(resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
super.onLoadFailed(errorDrawable);
|
||||
Glide.with(imageView.getContext())
|
||||
.asDrawable()
|
||||
.load(R.drawable.missing_peertube)
|
||||
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
Glide.with(imageView.getContext())
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="?colorSecondaryContainer"
|
||||
android:textColor="?colorOnSecondaryContainer"
|
||||
android:padding="6dp"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
|
@ -156,7 +157,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="?colorAccent"
|
||||
android:textColor="?colorPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:maxLines="1"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
|
Loading…
Reference in New Issue