mirror of https://github.com/M66B/FairEmail.git
Use identity IP by default
This commit is contained in:
parent
c8238ae1ae
commit
26290a693a
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue