mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): keep mature content consent across account switches (#3291)
This commit is contained in:
1 parent
4da8dec4ac
commit
0906a85d6f
6 files changed
+3
-16
No files matched your search
@@ -107,8 +107,6 @@ vi.mock('@app/features/app/state/RuntimeCrash', () => ({default: {triggerFatalCr
|
||||
|
||||
vi.mock('@app/features/expressions/state/FavoriteMemes', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/guild/state/GuildMatureContentAgree', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/member/state/MemberSearch', () => ({default: {handleLogout: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/messaging/state/MessagingMessages', () => ({
|
||||
|
||||
@@ -131,8 +131,6 @@ vi.mock('@app/features/auth/state/Authentication', () => ({
|
||||
|
||||
vi.mock('@app/features/expressions/state/FavoriteMemes', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/guild/state/GuildMatureContentAgree', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/member/state/MemberSearch', () => ({default: {handleLogout: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/messaging/state/MessagingMessages', () => ({
|
||||
|
||||
@@ -44,7 +44,6 @@ import {
|
||||
type GatewayVoiceStateUpdateParams,
|
||||
} from '@app/features/gateway/transport/GatewaySocket';
|
||||
import {selectGuildActivationTarget} from '@app/features/gateway/transport/GuildActivationTarget';
|
||||
import GuildMatureContentAgree from '@app/features/guild/state/GuildMatureContentAgree';
|
||||
import MemberSearch from '@app/features/member/state/MemberSearch';
|
||||
import AttachmentUrlRefresher from '@app/features/messaging/state/AttachmentUrlRefresher';
|
||||
import Messages from '@app/features/messaging/state/MessagingMessages';
|
||||
@@ -957,7 +956,6 @@ export class PooledGatewayConnection {
|
||||
Messages.handleSessionInvalidated();
|
||||
FavoriteMemes.reset();
|
||||
AttachmentUrlRefresher.reset();
|
||||
GuildMatureContentAgree.reset();
|
||||
ChannelFrecency.handleLogout();
|
||||
MemberSearch.handleLogout();
|
||||
ThreadPanel.closeCreate();
|
||||
|
||||
@@ -101,8 +101,6 @@ vi.mock('@app/features/auth/state/Authentication', () => ({
|
||||
|
||||
vi.mock('@app/features/expressions/state/FavoriteMemes', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/guild/state/GuildMatureContentAgree', () => ({default: {reset: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/member/state/MemberSearch', () => ({default: {handleLogout: vi.fn()}}));
|
||||
|
||||
vi.mock('@app/features/messaging/state/MessagingMessages', () => ({
|
||||
|
||||
@@ -37,7 +37,9 @@ function put(channel: WireChannel): void {
|
||||
|
||||
beforeEach(() => {
|
||||
channels.clear();
|
||||
GuildMatureContentAgree.reset();
|
||||
GuildMatureContentAgree.revokeChannel('parent');
|
||||
GuildMatureContentAgree.revokeChannel('forum');
|
||||
GuildMatureContentAgree.revokeCategory('category');
|
||||
put({id: 'category', guild_id: 'guild', type: ChannelTypes.GUILD_CATEGORY, nsfw_override: null});
|
||||
put({id: 'parent', guild_id: 'guild', type: ChannelTypes.GUILD_TEXT, parent_id: 'category', nsfw_override: null});
|
||||
put({id: 'thread', guild_id: 'guild', type: ChannelTypes.PUBLIC_THREAD, parent_id: 'parent'});
|
||||
|
||||
@@ -128,13 +128,6 @@ class GuildMatureContentAgree {
|
||||
}
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
this.localAgreedChannelIds = [];
|
||||
this.agreedChannelIds = [];
|
||||
this.agreedCategoryIds = [];
|
||||
this.agreedGuildIds = [];
|
||||
}
|
||||
|
||||
revokeChannel(channelId: string): void {
|
||||
this.localAgreedChannelIds = this.localAgreedChannelIds.filter((id) => id !== channelId);
|
||||
this.agreedChannelIds = this.agreedChannelIds.filter((id) => id !== channelId);
|
||||
|
||||
Reference in new issue
Block a user