Skip to content

Commit

Permalink
[ReadAllButton] Release v1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed Jun 7, 2024
1 parent 16ede3e commit 0f6d4ac
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 7 deletions.
21 changes: 21 additions & 0 deletions common/components/ChannelAttachmentUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,30 @@ export enum AttachmentListItemSizes {
MEDIUM,
}

interface ClipMetadata {
applicationId?: string;
applicationName: string;
clipMethod: "auto" | "manual";
editMetadata?: {
applicationAudio: boolean;
end: number;
start: number;
voiceAudio: boolean;
};
filepath: string;
gameName?: string;
id: string;
length: number;
name?: string;
thumbnail: string;
users: string[];
version?: number;
}

interface ChannelAttachmentUploadProps {
canEdit?: boolean;
channelId: string;
clip?: ClipMetadata;
draftType: DraftType;
hideFileName?: boolean;
keyboardModeEnabled?: boolean;
Expand Down
1 change: 1 addition & 0 deletions common/components/ListItemTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface ListItemTooltipProps {
shouldShow?: boolean;
text: string;
tooltipClass?: string;
tooltipContentClass?: string;
}

export type ListItemTooltipType = React.FC<ListItemTooltipProps>;
Expand Down
1 change: 1 addition & 0 deletions common/components/Popout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ interface BasePopoutProps {
shouldShow?: boolean;
spacing?: number;
useMouseEnter?: boolean;
useRawTargetDimensions?: boolean;
}

interface BasePopoutState {
Expand Down
11 changes: 10 additions & 1 deletion common/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ interface SearchBarProps extends Omit<React.ComponentPropsWithoutRef<"div">, "on
size?: string;
}

export type SearchBarType = React.FC<React.PropsWithChildren<SearchBarProps>> & {
export declare class SearchBar extends React.PureComponent<SearchBarProps> {
public inputRef: React.RefObject<HTMLInputElement>;
public containerRef: React.RefObject<HTMLDivElement>;
public handleOnChange: React.ChangeEventHandler<HTMLInputElement>;

public focus: () => void;
public blur: () => void;
}

export type SearchBarType = typeof SearchBar & {
defaultProps: SearchBarProps;
Sizes: Record<"SMALL" | "MEDIUM" | "LARGE", string>;
};
Expand Down
12 changes: 7 additions & 5 deletions common/stores/ReadStateStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum ReadStateTypes {
NOTIFICATION_CENTER,
GUILD_HOME,
GUILD_ONBOARDING_QUESTION,
MESSAGE_REQUESTS,
}

export enum UserNotificationSettings {
Expand Down Expand Up @@ -150,20 +151,20 @@ declare class ReadState {
private _persisted: boolean;
private _unreadCount: number;

public ackedWhileCached: boolean | undefined;
public ackedWhileCached?: boolean | undefined;
public ackMessageIdAtChannelSelect: string | null;
public ackPinTimestamp: number;
public channelId: string;
public estimated: boolean;
public flags: ReadStateFlags;
public flags?: ReadStateFlags;
public isManualAck: boolean;
public lastPinTimestamp: number;
public lastViewed: number | undefined;
public lastViewed?: number;
public loadedMessages: boolean;
public oldestUnreadMessageIdStale: boolean;
public outgoingAck: string | null;
public outgoingAckTimer: NodeJS.Timeout | null;
public snapshot: Snapshot | undefined;
public snapshot?: Snapshot;
public type: ReadStateTypes;

public get ackMessageId(): string | null;
Expand Down Expand Up @@ -242,7 +243,8 @@ export declare class ReadStateStore extends Flux.Store {
public getGuildUnreadsSentinel: (guildId: string) => number;
public getMentionChannelIds: () => string[];
public getMentionCount: (channelId: string, readStateType?: ReadStateTypes) => number;
public getNotifCenterReadState: (channelId: string) => ReadState;
public getNonChannelAckId: (channelId: string) => string | null;
public getNotifCenterReadState: (channelId: string) => ReadState | undefined;
public getOldestUnreadMessageId: (
channelId: string,
readStateType?: ReadStateTypes,
Expand Down
2 changes: 2 additions & 0 deletions common/stores/UploadAttachmentStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export enum DraftType {
ThreadSettings,
FirstThreadMessage,
ApplicationLauncherCommand,
Poll,
SlashCommand,
}

export declare class UploadAttachmentStore extends Flux.Store {
Expand Down
1 change: 1 addition & 0 deletions common/types/messages/MessageEditor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface RichValue {
}

interface MessageEditorInnerProps {
channel: Channel;
message: Message;
onChange: (unknown: null, value: string, richValue: RichValue[]) => void;
onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
Expand Down
1 change: 1 addition & 0 deletions plugins/JumpToFirstMessage/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface MessagesProps {
filterAfterTimestamp: number | undefined;
fontSize: number;
hasUnreads: boolean;
hideSummaries?: boolean;
keyboardModeEnabled: boolean;
messageDisplayCompact: boolean;
messageGroupSpacing: number;
Expand Down
2 changes: 1 addition & 1 deletion plugins/ReadAllButton/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"discordID": "403195964241739776",
"github": "FedeIlLeone"
},
"version": "1.5.2",
"version": "1.5.3",
"updater": {
"type": "store",
"id": "dev.fedeilleone.ReadAllButton"
Expand Down

0 comments on commit 0f6d4ac

Please sign in to comment.