Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2024-09-22 13:23:07 -04:00
commit 6545a470d7
24 changed files with 350 additions and 288 deletions

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Guild, GuildMember, User } from "discord-types/general";
import { Channel, Guild, GuildMember, User } from "discord-types/general";
import type { ReactNode } from "react";
import { LiteralUnion } from "type-fest";
@ -175,6 +175,11 @@ export interface NavigationRouter {
transitionToGuild(guildId: string, ...args: unknown[]): void;
}
export interface ChannelRouter {
transitionToChannel: (channelId: string) => void;
transitionToThread: (channel: Channel) => void;
}
export interface IconUtils {
getUserAvatarURL(user: User, canAnimate?: boolean, size?: number, format?: string): string;
getDefaultAvatarURL(id: string, discriminator?: string): string;

View file

@ -151,6 +151,10 @@ export const NavigationRouter: t.NavigationRouter = mapMangledModuleLazy("Transi
back: filters.byCode("goBack()"),
forward: filters.byCode("goForward()"),
});
export const ChannelRouter: t.ChannelRouter = mapMangledModuleLazy('"Thread must have a parent ID."', {
transitionToChannel: filters.byCode(".preload"),
transitionToThread: filters.byCode('"Thread must have a parent ID."')
});
export let SettingsRouter: any;
waitFor(["open", "saveAccountChanges"], m => SettingsRouter = m);