mirror of https://github.com/M66B/FairEmail.git
Native SVG support
This commit is contained in:
parent
9644a1a4c6
commit
4b6e8dda2f
File diff suppressed because it is too large
Load Diff
|
@ -3173,8 +3173,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
List<EntityAttachment> images = new ArrayList<>();
|
||||
if (thumbnails && bind_extras)
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.isAttachment() &&
|
||||
(attachment.isImage() || "image/svg+xml".equals(attachment.getMimeType())))
|
||||
if (attachment.isAttachment() && attachment.isImage())
|
||||
images.add(attachment);
|
||||
adapterImage.set(images);
|
||||
grpImages.setVisibility(images.size() > 0 ? View.VISIBLE : View.GONE);
|
||||
|
|
|
@ -71,7 +71,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
|
|||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 226,
|
||||
version = 227,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
|
@ -2269,7 +2269,7 @@ public abstract class DB extends RoomDatabase {
|
|||
db.execSQL("ALTER TABLE `attachment` ADD COLUMN `related` INTEGER");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||
createTriggers(db, true);
|
||||
createTriggers(db);
|
||||
}
|
||||
}).addMigrations(new Migration(223, 224) {
|
||||
@Override
|
||||
|
@ -2291,6 +2291,14 @@ public abstract class DB extends RoomDatabase {
|
|||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("ALTER TABLE `answer` ADD COLUMN `snippet` INTEGER NOT NULL DEFAULT 0");
|
||||
}
|
||||
}).addMigrations(new Migration(226, 227) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||
createTriggers(db, true);
|
||||
}
|
||||
}).addMigrations(new Migration(998, 999) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
|
|
|
@ -93,6 +93,7 @@ class ImageHelper {
|
|||
|
||||
// https://developer.android.com/guide/topics/media/media-formats#image-formats
|
||||
static final List<String> IMAGE_TYPES = Collections.unmodifiableList(Arrays.asList(
|
||||
"image/svg+xml", // native
|
||||
"image/bmp",
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
|
|
Loading…
Reference in New Issue