This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
// Metro module 16331 (f16332).
import { removeFavoriteChannel, setFavoriteCategoryCollapsed, setAllFavoriteCategoriesCollapsed } from "./FavoritesActionCreators";
import { isFavoritesGuildId } from "./FavoritesUtils";
import AutomaticLifecycleManager from "../../lib/AutomaticLifecycleManager";
let handleCategoryCollapse, handleCategoryExpand, handleCategoryCollapseAll, handleCategoryExpandAll;
const handleChannelDelete = function handleChannelDelete(a0) {
removeFavoriteChannel(a0.channel.id, {
trackAnalytics: false
});
};
handleCategoryCollapse = function handleCategoryCollapse(a0) {
setFavoriteCategoryCollapsed(a0.id, true);
};
handleCategoryExpand = function handleCategoryExpand(a0) {
setFavoriteCategoryCollapsed(a0.id, false);
};
handleCategoryCollapseAll = function handleCategoryCollapseAll(a0) {
if (isFavoritesGuildId(a0.guildId)) {
setAllFavoriteCategoriesCollapsed(true);
}
};
handleCategoryExpandAll = function handleCategoryExpandAll(a0) {
if (isFavoritesGuildId(a0.guildId)) {
setAllFavoriteCategoriesCollapsed(false);
}
};
class FavoriteManager extends AutomaticLifecycleManager {
actions = {
CHANNEL_DELETE: handleChannelDelete,
CATEGORY_COLLAPSE: handleCategoryCollapse,
CATEGORY_EXPAND: handleCategoryExpand,
CATEGORY_COLLAPSE_ALL: handleCategoryCollapseAll,
CATEGORY_EXPAND_ALL: handleCategoryExpandAll
};
}
const favoriteManager = new FavoriteManager();
export default favoriteManager;