Language selection fixes (#2917)
* Fix duplicated language entries from system and app language sets. Closes #2900 * Prefer modern language codes. Closes #2903 * Synchronize per-account default posting language with server. Closes #2902 * Allow users to post in languages android doesn't know about yet (e.g. toki pona) * Always put the preselected language at the top of the list
This commit is contained in:
parent
4f81636bbe
commit
0126ee9500
11 changed files with 1043 additions and 18 deletions
|
|
@ -31,7 +31,7 @@ import java.io.File;
|
|||
*/
|
||||
@Database(entities = { DraftEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
|
||||
TimelineAccountEntity.class, ConversationEntity.class
|
||||
}, version = 42)
|
||||
}, version = 43)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
public abstract AccountDao accountDao();
|
||||
|
|
@ -610,4 +610,11 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||
database.execSQL("ALTER TABLE `ConversationEntity` ADD COLUMN `s_language` TEXT");
|
||||
}
|
||||
};
|
||||
|
||||
public static final Migration MIGRATION_42_43 = new Migration(42, 43) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `defaultPostLanguage` TEXT NOT NULL DEFAULT ''");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue