Skip to content

Commit 7b3ca22

Browse files
authored
feat: legacy post view mode (#3811)
1 parent 6bb8bd5 commit 7b3ca22

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

__tests__/boot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,7 @@ describe('boot misc', () => {
14021402
sidebarBookmarksExpanded: true,
14031403
clickbaitShieldEnabled: true,
14041404
browsingContextEnabled: false,
1405+
legacyPostLayoutOptOut: false,
14051406
},
14061407
});
14071408
expect(res.body.settings.flags.removedFlag).toBeUndefined();

src/common/flags.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const transformSettingFlags = ({ flags }: Pick<Settings, 'flags'>) => {
1313
timezoneMismatchIgnore,
1414
lastPrompt,
1515
defaultWriteTab,
16+
legacyPostLayoutOptOut,
1617
} = flags ?? {};
1718

1819
return {
@@ -27,5 +28,6 @@ export const transformSettingFlags = ({ flags }: Pick<Settings, 'flags'>) => {
2728
timezoneMismatchIgnore,
2829
lastPrompt,
2930
defaultWriteTab,
31+
legacyPostLayoutOptOut: legacyPostLayoutOptOut ?? false,
3032
};
3133
};

src/entity/Settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export type SettingsFlags = Partial<{
3838
timezoneMismatchIgnore: string;
3939
lastPrompt: string;
4040
defaultWriteTab: DefaultWriteTab;
41+
legacyPostLayoutOptOut: boolean;
4142
}>;
4243

4344
export type SettingsFlagsPublic = Pick<
@@ -53,6 +54,7 @@ export type SettingsFlagsPublic = Pick<
5354
| 'timezoneMismatchIgnore'
5455
| 'lastPrompt'
5556
| 'defaultWriteTab'
57+
| 'legacyPostLayoutOptOut'
5658
>;
5759

5860
@Entity()

src/schema/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const typeDefs = /* GraphQL */ `
7676
timezoneMismatchIgnore: String
7777
lastPrompt: String
7878
defaultWriteTab: DefaultWriteTab
79+
legacyPostLayoutOptOut: Boolean
7980
}
8081
8182
input SettingsFlagsPublicInput {
@@ -90,6 +91,7 @@ export const typeDefs = /* GraphQL */ `
9091
timezoneMismatchIgnore: String
9192
lastPrompt: String
9293
defaultWriteTab: DefaultWriteTab
94+
legacyPostLayoutOptOut: Boolean
9395
}
9496
9597
"""

0 commit comments

Comments
 (0)