mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 05:15:13 +02:00
Show threading count / outbox
This commit is contained in:
@@ -71,7 +71,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
|
||||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 228,
|
||||
version = 229,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
@@ -1617,7 +1617,8 @@ public abstract class DB extends RoomDatabase {
|
||||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("CREATE VIEW IF NOT EXISTS `account_view` AS " +
|
||||
TupleAccountView.query.replace(", category", ""));
|
||||
db.execSQL("CREATE VIEW IF NOT EXISTS `identity_view` AS " + TupleIdentityView.query);
|
||||
db.execSQL("CREATE VIEW IF NOT EXISTS `identity_view` AS " +
|
||||
TupleIdentityView.query.replace(", account", ""));
|
||||
db.execSQL("CREATE VIEW IF NOT EXISTS `folder_view` AS " + TupleFolderView.query);
|
||||
}
|
||||
})
|
||||
@@ -2305,6 +2306,13 @@ public abstract class DB extends RoomDatabase {
|
||||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("ALTER TABLE `contact` ADD COLUMN `group` TEXT");
|
||||
}
|
||||
}).addMigrations(new Migration(228, 229) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("DROP VIEW IF EXISTS `identity_view`");
|
||||
db.execSQL("CREATE VIEW IF NOT EXISTS `identity_view` AS " + TupleIdentityView.query);
|
||||
}
|
||||
}).addMigrations(new Migration(998, 999) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
|
||||
@@ -163,7 +163,7 @@ public interface DaoMessage {
|
||||
" LEFT JOIN identity_view AS identity ON identity.id = message.identity" +
|
||||
" JOIN folder_view AS folder ON folder.id = message.folder" +
|
||||
" JOIN folder_view AS f ON f.id = :folder" +
|
||||
" WHERE (message.account = f.account OR " + is_outbox + ")" +
|
||||
" WHERE (message.account = f.account OR message.account = identity.account OR " + is_outbox + ")" +
|
||||
" AND (:threading OR folder.id = :folder)" +
|
||||
" AND (NOT message.ui_hide OR :debug)" +
|
||||
" AND (NOT :found OR message.ui_found = :found)" +
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Objects;
|
||||
value = TupleIdentityView.query
|
||||
)
|
||||
public class TupleIdentityView {
|
||||
static final String query = "SELECT id, name, email, display, color, synchronize FROM identity";
|
||||
static final String query = "SELECT id, name, email, account, display, color, synchronize FROM identity";
|
||||
|
||||
@NonNull
|
||||
public Long id;
|
||||
@@ -38,6 +38,8 @@ public class TupleIdentityView {
|
||||
public String name;
|
||||
@NonNull
|
||||
public String email;
|
||||
@NonNull
|
||||
public Long account;
|
||||
public String display;
|
||||
public Integer color;
|
||||
@NonNull
|
||||
|
||||
Reference in New Issue
Block a user