Fix crashes & improve GNUSocial urls

This commit is contained in:
stom79 2019-02-06 14:59:52 +01:00
parent 0c62d37574
commit 893928985a
3 changed files with 22 additions and 7 deletions

View File

@ -2517,12 +2517,16 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, MediaActivity.class);
Bundle b = new Bundle();
intent.putParcelableArrayListExtra("mediaArray", status.getMedia_attachments());
b.putInt("position", finalPosition);
intent.putExtras(b);
context.startActivity(intent);
if( attachment.getType().equals("web")){
Helper.openBrowser(context, attachment.getUrl());
}else {
Intent intent = new Intent(context, MediaActivity.class);
Bundle b = new Bundle();
intent.putParcelableArrayListExtra("mediaArray", status.getMedia_attachments());
b.putInt("position", finalPosition);
intent.putExtras(b);
context.startActivity(intent);
}
}
});
i++;

View File

@ -2938,7 +2938,9 @@ public class Helper {
try {
takenImage = MediaStore.Images.Media.getBitmap(context.getContentResolver(), uriFile);
} catch (IOException e) {
Toasty.error(context, context.getString(R.string.toast_error),Toast.LENGTH_LONG).show();
try {
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
}catch (Exception ignored){};
return null;
}
ExifInterface exif = null;

View File

@ -156,6 +156,15 @@
android:id="@+id/account_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_marginTop="5dp"
android:visibility="gone"
android:textColor="@color/mastodonC4"
android:background="@drawable/blue_border"
android:text="@string/bot"
android:id="@+id/account_bot"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/temp_mute"
android:visibility="gone"