mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 20:34:49 +01:00
Use identity IP by default
This commit is contained in:
1534
app/schemas/eu.faircode.email.DB/48.json
Normal file
1534
app/schemas/eu.faircode.email.DB/48.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
|
||||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 47,
|
||||
version = 48,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
@@ -523,6 +523,13 @@ public abstract class DB extends RoomDatabase {
|
||||
db.execSQL("ALTER TABLE `identity` ADD COLUMN `use_ip` INTEGER NOT NULL DEFAULT 0");
|
||||
}
|
||||
})
|
||||
.addMigrations(new Migration(47, 48) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase db) {
|
||||
Log.i("DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("UPDATE `identity` SET use_ip = 1");
|
||||
}
|
||||
})
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class EntityIdentity {
|
||||
public String password;
|
||||
public String realm;
|
||||
@NonNull
|
||||
public Boolean use_ip = false; // instead of domain name
|
||||
public Boolean use_ip = true; // instead of domain name
|
||||
@NonNull
|
||||
public Boolean synchronize;
|
||||
@NonNull
|
||||
|
||||
@@ -757,7 +757,7 @@ public class FragmentIdentity extends FragmentBase {
|
||||
etUser.setText(identity == null ? null : identity.user);
|
||||
tilPassword.getEditText().setText(identity == null ? null : identity.password);
|
||||
etRealm.setText(identity == null ? null : identity.realm);
|
||||
cbUseIp.setChecked(identity == null ? false : identity.use_ip);
|
||||
cbUseIp.setChecked(identity == null ? true : identity.use_ip);
|
||||
cbSynchronize.setChecked(identity == null ? true : identity.synchronize);
|
||||
cbPrimary.setChecked(identity == null ? true : identity.primary);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user