Add option for default reply privacy set to unlisted by default (#4496)
This PR fixes https://github.com/tuskyapp/Tusky/issues/2798 and is mostly based on and supersedes https://github.com/tuskyapp/Tusky/pull/2826 but I have fixed all merge conflicts and unit tests. I tested the changes locally and the setting takes effect immediately for replies, and persists across killing the app. --------- Co-authored-by: Eva Tatarka <eva@tatarka.me> Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
This commit is contained in:
parent
8584e72f48
commit
9883bfa7c2
8 changed files with 118 additions and 10 deletions
|
|
@ -62,7 +62,7 @@ import java.io.File;
|
|||
},
|
||||
// Note: Starting with version 54, database versions in Tusky are always even.
|
||||
// This is to reserve odd version numbers for use by forks.
|
||||
version = 60,
|
||||
version = 62,
|
||||
autoMigrations = {
|
||||
@AutoMigration(from = 48, to = 49),
|
||||
@AutoMigration(from = 49, to = 50, spec = AppDatabase.MIGRATION_49_50.class),
|
||||
|
|
@ -841,4 +841,11 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||
);
|
||||
}
|
||||
};
|
||||
|
||||
public static final Migration MIGRATION_60_62 = new Migration(60, 62) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
database.execSQL("ALTER TABLE `AccountEntity` ADD COLUMN `defaultReplyPrivacy` INTEGER NOT NULL DEFAULT 2");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ data class AccountEntity(
|
|||
var notificationVibration: Boolean = true,
|
||||
var notificationLight: Boolean = true,
|
||||
var defaultPostPrivacy: Status.Visibility = Status.Visibility.PUBLIC,
|
||||
var defaultReplyPrivacy: Status.Visibility = Status.Visibility.UNLISTED,
|
||||
var defaultMediaSensitivity: Boolean = false,
|
||||
var defaultPostLanguage: String = "",
|
||||
var alwaysShowSensitiveMedia: Boolean = false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue