decord/source/modules/user_settings/PreloadedUserSettingsMigrations.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

689 lines
26 KiB
TypeScript

// Module ID: 14571
// Function ID: 14572
// Name: PreloadedUserSettingsMigrations
// Dependencies: [1958, 1074, 1186, 1943, 7323, 510, 1222, 504, 1217, 1944, 7631, 2]
// Module 14571 (PreloadedUserSettingsMigrations)
import initializeDefault from "initialize" /* 504 */;
import Storage4 from "Storage" /* 510 */;
import preloaded_user_settings from "preloaded_user_settings" /* 1186 */;
import wrappers from "wrappers" /* 1217 */;
import user_settings_UserSettingsUtils from "user_settings/UserSettingsUtils" /* 1222 */;
import dismissible_content from "dismissible_content" /* 1944 */;
import HotspotStore2 from "HotspotStore" /* 7323 */;
import ChannelStore from "ChannelStore" /* 1958 */;
require = fn;
function migrateHotspotLocation(userContent, HUB_LINK_CHANNEL_NOTICE, CHANNEL_NOTICE_HUBLINK) {
const HotspotStore = HotspotStore2.HotspotStore;
let hasHiddenHotspotResult = HotspotStore.hasHiddenHotspot(HUB_LINK_CHANNEL_NOTICE);
if (hasHiddenHotspotResult) {
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array;
}
let flag = false;
if (!tmpResult.hasBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_HUBLINK)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_HUBLINK);
flag = true;
const tmpResult2 = tmp(1943);
}
hasHiddenHotspotResult = flag;
tmpResult = tmp(1943);
}
return hasHiddenHotspotResult;
}
const ChannelNoticeTypes = fn(1074).ChannelNoticeTypes;
let items = [
{
version: 2,
run(inbox) {
if (null != inbox.inbox) {
return false;
} else {
const InboxSettings = preloaded_user_settings.InboxSettings;
const obj = InboxSettings.create();
inbox.inbox = obj;
const Storage3 = Storage4.Storage;
let flag2 = false;
if (Storage3.get("seenInboxTutorial", false)) {
obj.viewedTutorial = true;
flag2 = true;
}
const Storage = tmp16(510).Storage;
value = Storage.get("recentsButtonTab2");
if (null == value) {
const Storage2 = tmp16(510).Storage;
value2 = Storage2.get("unread-messages-collapsed-channels");
if (value2 == null) {
value2 = {};
}
let flag4 = flag2;
let tmp4 = flag2;
const keys = Object.keys();
if (keys !== undefined) {
tmp4 = flag4;
while (keys[tmp] !== undefined) {
if (!value2[tmp7]) {
continue;
} else {
let channel = ChannelStore.getChannel(tmp7);
flag4 = tmp6;
if (null == channel) {
continue;
} else {
let obj2 = user_settings_UserSettingsUtils;
let str4 = channel.guild_id;
if (str4 == null) {
str4 = "0";
}
let result = obj2.mutateUserChannelSettings(inbox, str4, channel.id, (arg0) => {
arg0.collapsedInInbox = true;
});
flag4 = true;
continue;
}
continue;
}
continue;
}
}
return tmp4;
} else {
if (value === { Mentions: "Recent Mentions", Unreads: "Inbox" }.Mentions) {
let UNREADS = tmp16(1186).InboxTab.MENTIONS;
} else {
UNREADS = tmp16(1186).InboxTab.UNREADS;
}
obj.currentTab = UNREADS;
}
}
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("seenInboxTutorial");
const Storage2 = Storage4.Storage;
Storage2.remove("recentsButtonTab2");
const Storage3 = Storage4.Storage;
Storage3.remove("unread-messages-collapsed-channels");
}
},
{
version: 3,
run(textAndImages) {
const PersistedStore = initializeDefault.PersistedStore;
const items = [
() => {
const Storage = Storage4.Storage;
const diversitySurrogate = Storage.get("EmojiDiversitySurrogate") || "";
return { diversitySurrogate };
}
];
const state = PersistedStore.migrateAndReadStoreState("EmojiStore", items).state;
if (null == state) {
return false;
} else {
let tmp2 = null != state.diversitySurrogate;
if (tmp2) {
tmp2 = "" !== state.diversitySurrogate;
}
let flag = false;
if (tmp2) {
if (null == textAndImages.textAndImages) {
const TextAndImagesSettings = preloaded_user_settings.TextAndImagesSettings;
textAndImages.textAndImages = TextAndImagesSettings.create();
}
if (null == textAndImages.textAndImages.diversitySurrogate) {
const StringValue = wrappers.StringValue;
textAndImages.textAndImages.diversitySurrogate = StringValue.create();
}
textAndImages.textAndImages.diversitySurrogate.value = state.diversitySurrogate;
flag = true;
}
return flag;
}
},
cleanup() {
}
},
{
version: 5,
run(textAndImages) {
textAndImages = textAndImages.textAndImages;
if (textAndImages == null) {
const TextAndImagesSettings = preloaded_user_settings.TextAndImagesSettings;
textAndImages = TextAndImagesSettings.create();
}
textAndImages.textAndImages = textAndImages;
let notifications = textAndImages.notifications;
if (notifications == null) {
const NotificationSettings = preloaded_user_settings.NotificationSettings;
notifications = NotificationSettings.create();
}
textAndImages.notifications = notifications;
let privacy = textAndImages.privacy;
if (privacy == null) {
const PrivacySettings = preloaded_user_settings.PrivacySettings;
privacy = PrivacySettings.create();
}
textAndImages.privacy = privacy;
let voiceAndVideo = textAndImages.voiceAndVideo;
if (voiceAndVideo == null) {
const VoiceAndVideoSettings = preloaded_user_settings.VoiceAndVideoSettings;
voiceAndVideo = VoiceAndVideoSettings.create();
}
textAndImages.voiceAndVideo = voiceAndVideo;
let gameLibrary = textAndImages.gameLibrary;
if (gameLibrary == null) {
const GameLibrarySettings = preloaded_user_settings.GameLibrarySettings;
gameLibrary = GameLibrarySettings.create();
}
textAndImages.gameLibrary = gameLibrary;
let debug = textAndImages.debug;
if (debug == null) {
const DebugSettings = preloaded_user_settings.DebugSettings;
debug = DebugSettings.create();
}
textAndImages.debug = debug;
const Storage = Storage4.Storage;
let obj = Storage.get("UserSettingsStore");
if (obj == null) {
obj = {};
}
let flag = false;
if (typeof obj.useRichChatTextBox === "boolean") {
const BoolValue = tmp13(1217).BoolValue;
const obj2 = { value: obj.useRichChatTextBox };
textAndImages.textAndImages.useRichChatInput = BoolValue.create(obj2);
flag = true;
}
if (typeof obj.renderSpoilers === "string") {
const StringValue = tmp13(1217).StringValue;
const obj3 = { value: obj.renderSpoilers };
textAndImages.textAndImages.renderSpoilers = StringValue.create(obj3);
flag = true;
}
if (typeof obj.useThreadSidebar === "boolean") {
const BoolValue2 = tmp13(1217).BoolValue;
const obj4 = { value: obj.useThreadSidebar };
textAndImages.textAndImages.useThreadSidebar = BoolValue2.create(obj4);
flag = true;
}
if (typeof obj.showInAppNotifications === "boolean") {
const BoolValue3 = tmp13(1217).BoolValue;
const obj5 = { value: obj.showInAppNotifications };
textAndImages.notifications.showInAppNotifications = BoolValue3.create(obj5);
flag = true;
}
if (obj.emojiPickerCollapsedSections instanceof Array) {
textAndImages.textAndImages.emojiPickerCollapsedSections = obj.emojiPickerCollapsedSections;
flag = true;
}
if (obj.stickerPickerCollapsedSections instanceof Array) {
textAndImages.textAndImages.stickerPickerCollapsedSections = obj.stickerPickerCollapsedSections;
flag = true;
}
if (typeof obj.viewImageDescriptions === "boolean") {
const BoolValue4 = tmp13(1217).BoolValue;
const obj6 = { value: obj.viewImageDescriptions };
textAndImages.textAndImages.viewImageDescriptions = BoolValue4.create(obj6);
flag = true;
}
if (typeof obj.showCommandSuggestions === "boolean") {
const BoolValue5 = tmp13(1217).BoolValue;
const obj7 = { value: obj.showCommandSuggestions };
textAndImages.textAndImages.showCommandSuggestions = BoolValue5.create(obj7);
flag = true;
}
if (typeof obj.alwaysPreviewVideo === "boolean") {
const BoolValue6 = tmp13(1217).BoolValue;
const obj8 = { value: obj.alwaysPreviewVideo };
textAndImages.voiceAndVideo.alwaysPreviewVideo = BoolValue6.create(obj8);
flag = true;
}
if (typeof obj.notifyFriendsOnGoLive === "boolean") {
const BoolValue7 = tmp13(1217).BoolValue;
const obj9 = { value: obj.notifyFriendsOnGoLive };
textAndImages.notifications.notifyFriendsOnGoLive = BoolValue7.create(obj9);
flag = true;
}
if (typeof obj.installShortcutDesktop === "boolean") {
const BoolValue8 = tmp13(1217).BoolValue;
const obj10 = { value: obj.installShortcutDesktop };
textAndImages.gameLibrary.installShortcutDesktop = BoolValue8.create(obj10);
flag = true;
}
if (typeof obj.installShortcutStartMenu === "boolean") {
const BoolValue9 = tmp13(1217).BoolValue;
const obj11 = { value: obj.installShortcutStartMenu };
textAndImages.gameLibrary.installShortcutStartMenu = BoolValue9.create(obj11);
flag = true;
}
if (typeof obj.allowActivityPartyPrivacyFriends === "boolean") {
const BoolValue10 = tmp13(1217).BoolValue;
const obj12 = { value: obj.allowActivityPartyPrivacyFriends };
textAndImages.privacy.allowActivityPartyPrivacyFriends = BoolValue10.create(obj12);
flag = true;
}
if (typeof obj.allowActivityPartyPrivacyVoiceChannel === "boolean") {
const BoolValue11 = tmp13(1217).BoolValue;
const obj13 = { value: obj.allowActivityPartyPrivacyVoiceChannel };
textAndImages.privacy.allowActivityPartyPrivacyVoiceChannel = BoolValue11.create(obj13);
flag = true;
}
if (typeof obj.rtcPanelShowVoiceStates === "boolean") {
const BoolValue12 = tmp13(1217).BoolValue;
const obj14 = { value: obj.rtcPanelShowVoiceStates };
textAndImages.debug.rtcPanelShowVoiceStates = BoolValue12.create(obj14);
flag = true;
}
return flag;
},
cleanup() {
}
},
{
version: 10,
run(userContent) {
let flag = migrateHotspotLocation(userContent, HotspotStore2.HotspotLocations.HUB_LINK_CHANNEL_NOTICE, dismissible_content.DismissibleContent.CHANNEL_NOTICE_HUBLINK);
const Storage = Storage4.Storage;
let obj = Storage.get("channelNotices");
if (obj == null) {
obj = {};
}
let tmp4 = false === obj[ChannelNoticeTypes.INVITE];
if (tmp4) {
const CHANNEL_NOTICE_INVITE = tmp(1944).DismissibleContent.CHANNEL_NOTICE_INVITE;
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array;
}
let flag2 = false;
if (!tmpResult.hasBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_INVITE)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_INVITE);
flag2 = true;
const tmpResult6 = tmp(1943);
}
tmp4 = flag2;
tmpResult = tmp(1943);
}
if (tmp4) {
flag = true;
}
let tmp10 = false === obj[tmp3.QUICKSWITCHER];
if (tmp10) {
const CHANNEL_NOTICE_QUICKSWITCHER = tmp(1944).DismissibleContent.CHANNEL_NOTICE_QUICKSWITCHER;
if (null == userContent.userContent) {
const UserContentSettings2 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings2.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array2 = Uint8Array;
const uint8Array1 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array1;
}
let flag3 = false;
if (!tmpResult7.hasBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_QUICKSWITCHER)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_QUICKSWITCHER);
flag3 = true;
const tmpResult8 = tmp(1943);
}
tmp10 = flag3;
tmpResult7 = tmp(1943);
}
if (tmp10) {
flag = true;
}
let tmp16 = false === obj[tmp3.GUILD_BOOSTING];
if (tmp16) {
const CHANNEL_NOTICE_PREMIUM_GUILD_SUBSCRIPTION = tmp(1944).DismissibleContent.CHANNEL_NOTICE_PREMIUM_GUILD_SUBSCRIPTION;
if (null == userContent.userContent) {
const UserContentSettings3 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings3.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array3 = Uint8Array;
const uint8Array2 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array2;
}
let flag4 = false;
if (!tmpResult9.hasBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_PREMIUM_GUILD_SUBSCRIPTION)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, CHANNEL_NOTICE_PREMIUM_GUILD_SUBSCRIPTION);
flag4 = true;
const tmpResult10 = tmp(1943);
}
tmp16 = flag4;
tmpResult9 = tmp(1943);
}
if (tmp16) {
flag = true;
}
return flag;
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("channelNotices");
}
},
{
version: 12,
run(userContent) {
const Storage = Storage4.Storage;
value = Storage.get("hideNag");
if (value) {
const NAGBAR_NOTICE_DOWNLOAD = tmp(1944).DismissibleContent.NAGBAR_NOTICE_DOWNLOAD;
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array;
}
let flag = false;
if (!tmpResult.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_DOWNLOAD)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_DOWNLOAD);
flag = true;
const tmpResult6 = tmp(1943);
}
value = flag;
tmpResult = tmp(1943);
}
let flag2 = false;
if (value) {
flag2 = true;
}
const Storage2 = tmp(510).Storage;
let value3 = Storage2.get("hideConnectSpotify");
if (value3) {
const NAGBAR_NOTICE_CONNECT_SPOTIFY = tmp(1944).DismissibleContent.NAGBAR_NOTICE_CONNECT_SPOTIFY;
if (null == userContent.userContent) {
const UserContentSettings2 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings2.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array2 = Uint8Array;
const uint8Array1 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array1;
}
let flag3 = false;
if (!tmpResult7.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_CONNECT_SPOTIFY)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_CONNECT_SPOTIFY);
flag3 = true;
const tmpResult8 = tmp(1943);
}
value3 = flag3;
tmpResult7 = tmp(1943);
}
if (value3) {
flag2 = true;
}
const Storage3 = tmp(510).Storage;
let value4 = Storage3.get("hideConnectPlayStation");
if (value4) {
const NAGBAR_NOTICE_CONNECT_PLAYSTATION = tmp(1944).DismissibleContent.NAGBAR_NOTICE_CONNECT_PLAYSTATION;
if (null == userContent.userContent) {
const UserContentSettings3 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings3.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array3 = Uint8Array;
const uint8Array2 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array2;
}
let flag4 = false;
if (!tmpResult9.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_CONNECT_PLAYSTATION)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_CONNECT_PLAYSTATION);
flag4 = true;
const tmpResult10 = tmp(1943);
}
value4 = flag4;
tmpResult9 = tmp(1943);
}
if (value4) {
flag2 = true;
}
return flag2;
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("hideNag");
const Storage2 = Storage4.Storage;
Storage2.remove("hideConnectSpotify");
const Storage3 = Storage4.Storage;
Storage3.remove("hideConnectPlayStation");
}
},
{
version: 13,
run(userContent) {
const Storage = Storage4.Storage;
value = Storage.get("hidePremiumPromo");
if (value) {
const NAGBAR_NOTICE_PREMIUM_PROMO = tmp(1944).DismissibleContent.NAGBAR_NOTICE_PREMIUM_PROMO;
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array;
}
let flag = false;
if (!tmpResult.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_PROMO)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_PROMO);
flag = true;
const tmpResult6 = tmp(1943);
}
value = flag;
tmpResult = tmp(1943);
}
let flag2 = false;
if (value) {
flag2 = true;
}
const Storage2 = tmp(510).Storage;
let value3 = Storage2.get("hidePremiumTier2TrialEnding");
if (value3) {
const NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING = tmp(1944).DismissibleContent.NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING;
if (null == userContent.userContent) {
const UserContentSettings2 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings2.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array2 = Uint8Array;
const uint8Array1 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array1;
}
let flag3 = false;
if (!tmpResult7.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING);
flag3 = true;
const tmpResult8 = tmp(1943);
}
value3 = flag3;
tmpResult7 = tmp(1943);
}
if (value3) {
flag2 = true;
}
const Storage3 = tmp(510).Storage;
let value4 = Storage3.get("hidePremiumReactivateNotice");
if (value4) {
const NAGBAR_NOTICE_PREMIUM_REACTIVATE = tmp(1944).DismissibleContent.NAGBAR_NOTICE_PREMIUM_REACTIVATE;
if (null == userContent.userContent) {
const UserContentSettings3 = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings3.create();
}
if (null == userContent.userContent.dismissedContents) {
const _Uint8Array3 = Uint8Array;
const uint8Array2 = new Uint8Array();
userContent.userContent.dismissedContents = uint8Array2;
}
let flag4 = false;
if (!tmpResult9.hasBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_REACTIVATE)) {
userContent.userContent.dismissedContents = tmp(1943).addBit(userContent.userContent.dismissedContents, NAGBAR_NOTICE_PREMIUM_REACTIVATE);
flag4 = true;
const tmpResult10 = tmp(1943);
}
value4 = flag4;
tmpResult9 = tmp(1943);
}
if (value4) {
flag2 = true;
}
return flag2;
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("hidePremiumPromo");
const Storage2 = Storage4.Storage;
Storage2.remove("hidePremiumTier2TrialEnding");
const Storage3 = Storage4.Storage;
Storage3.remove("hidePremiumReactivateNotice");
}
},
{
version: 15,
run(userContent) {
return migrateHotspotLocation(userContent, HotspotStore2.HotspotLocations.NOW_PLAYING_CONSENT_CARD, dismissible_content.DismissibleContent.NOW_PLAYING_CONSENT_CARD);
},
cleanup() {
}
},
{
version: 16,
run(userContent) {
const Storage = Storage4.Storage;
value = Storage.get("PromotionsPersistedStore");
if (null == value) {
return false;
} else {
const lastDismissedOutboundPromotionStartDate = value._state.lastDismissedOutboundPromotionStartDate;
let flag = null != lastDismissedOutboundPromotionStartDate;
if (flag) {
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
}
flag = null == userContent.userContent.lastDismissedOutboundPromotionStartDate;
}
if (flag) {
const StringValue = tmp(1217).StringValue;
const obj = { value: lastDismissedOutboundPromotionStartDate };
userContent.userContent.lastDismissedOutboundPromotionStartDate = StringValue.create(obj);
flag = true;
}
return flag;
}
},
cleanup() {
}
},
{
version: 17,
run(textAndImages) {
const PersistedStore = initializeDefault.PersistedStore;
const state = PersistedStore.migrateAndReadStoreState("ExpressionSuggestionsPersistedStore", null).state;
if (null == state) {
return false;
} else {
const expressionSuggestionsEnabled = state.expressionSuggestionsEnabled;
let flag = null != expressionSuggestionsEnabled;
if (flag) {
if (null == textAndImages.textAndImages) {
const TextAndImagesSettings = preloaded_user_settings.TextAndImagesSettings;
textAndImages.textAndImages = TextAndImagesSettings.create();
}
flag = null == textAndImages.textAndImages.expressionSuggestionsEnabled;
}
if (flag) {
const BoolValue = wrappers.BoolValue;
const obj = { value: expressionSuggestionsEnabled };
textAndImages.textAndImages.expressionSuggestionsEnabled = BoolValue.create(obj);
flag = true;
}
return flag;
}
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("ExpressionSuggestionsPersistedStore");
}
},
{
version: 20,
run(userContent) {
const Storage = Storage4.Storage;
value = Storage.get("lastChangeLogId");
if (null == value) {
return false;
} else {
if (tmpResult.isSnowflake(value)) {
if (null == userContent.userContent) {
const UserContentSettings = tmp(1186).UserContentSettings;
userContent.userContent = UserContentSettings.create();
} else if (null != userContent.userContent) {
if (null != userContent.userContent.lastReceivedChangelogId) {
if ("0" !== userContent.userContent.lastReceivedChangelogId) {
const Storage3 = tmp(510).Storage;
Storage3.remove("lastChangeLogId");
return false;
}
}
}
userContent.userContent.lastReceivedChangelogId = value;
return true;
} else {
const Storage2 = tmp(510).Storage;
Storage2.remove("lastChangeLogId");
return false;
}
tmpResult = tmp(7631);
}
},
cleanup() {
const Storage = Storage4.Storage;
Storage.remove("lastChangeLogId");
}
},
{
version: 21,
run(appearance) {
appearance = appearance.appearance;
let uiDensity;
if (appearance != null) {
uiDensity = appearance.uiDensity;
}
let flag = uiDensity === preloaded_user_settings.UIDensity.COMPACT;
if (flag) {
appearance.appearance.uiDensity = preloaded_user_settings.UIDensity.DEFAULT;
flag = true;
}
return flag;
},
cleanup() {
}
}
];
const size = fn(2);
let result = size.fileFinishedImporting("modules/user_settings/PreloadedUserSettingsMigrations.tsx");
export default items;