feat: Change name of Preferences > Filters > Tabs and move them to Account Preferences(#3536) (#4115)

# Overview
In the previous code, when you open preferences, there is a section
headed "Filters" with a section called "Tabs"

This is confusing.

# Changes
- Change the section title from "Filters" to "Per-timeline preferences."
- Change the current "Tabs" section to "Home timeline" since it is only
for home timelines

# Screenshots
account preference screen | detail screen
:--: | :--:
|<image
src="https://github.com/tuskyapp/Tusky/assets/62137820/12694f24-b7e3-4ba3-90f5-53740e9c4269"
width="250" />|<image
src="https://github.com/tuskyapp/Tusky/assets/62137820/796e9ac1-76d6-43ef-a087-a1cd2d899ef8"
width="250" />

# Note
- Maybe string resources should have a new property? (for translation)

# Related link
 Fixes #3536

---------

Co-authored-by: mcc <andi.m.mcclure@gmail.com>
This commit is contained in:
sanao 2024-01-04 05:14:13 +09:00 committed by GitHub
commit e8e7bad110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 22 deletions

View file

@ -107,7 +107,11 @@ data class AccountEntity(
var locked: Boolean = false,
@ColumnInfo(defaultValue = "0")
var hasDirectMessageBadge: Boolean = false
var hasDirectMessageBadge: Boolean = false,
var isShowHomeBoosts: Boolean = true,
var isShowHomeReplies: Boolean = true,
var isShowHomeSelfBoosts: Boolean = true,
) {
val identifier: String

View file

@ -42,7 +42,7 @@ import java.io.File;
TimelineAccountEntity.class,
ConversationEntity.class
},
version = 54,
version = 56,
autoMigrations = {
@AutoMigration(from = 48, to = 49),
@AutoMigration(from = 49, to = 50, spec = AppDatabase.MIGRATION_49_50.class),
@ -686,4 +686,13 @@ public abstract class AppDatabase extends RoomDatabase {
database.execSQL("UPDATE `AccountEntity` SET `tabpreferences` = REPLACE(tabpreferences, 'Trending:', 'TrendingTags:')");
}
};
public static final Migration MIGRATION_54_56 = new Migration(54, 56) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `isShowHomeBoosts` INTEGER NOT NULL DEFAULT 1");
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `isShowHomeReplies` INTEGER NOT NULL DEFAULT 1");
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `isShowHomeSelfBoosts` INTEGER NOT NULL DEFAULT 1");
}
};
}