feat: voice fullscreen mode

This commit is contained in:
Tristan Yang
2023-04-27 11:56:21 +08:00
parent 3bcdb640cd
commit 86ec2ea808
14 changed files with 235 additions and 49 deletions
@@ -5,6 +5,7 @@ interface Params {
data: any;
operation: string;
}
const ignores = ["voice_fullscreen", "voice"];
export default async function handler({ operation, data = {}, payload }: Params) {
const table = window.CACHE["footprint"] as typeof localforage;;
if (operation.startsWith("reset")) {
@@ -71,14 +72,14 @@ export default async function handler({ operation, data = {}, payload }: Params)
break;
case "updateChannelVisibleAside":
{
if (payload.aside !== "voice") {
if (!ignores.includes(payload.aside)) {
await table?.setItem("channelAsides", data.channelAsides);
}
}
break;
case "updateDMVisibleAside":
{
if (payload.aside !== "voice") {
if (!ignores.includes(payload.aside)) {
await table?.setItem("dmAsides", data.dmAsides);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ import { OG } from "../../types/resource";
import { AutoDeleteMessageSettingDTO, AutoDeleteMsgForGroup, AutoDeleteMsgForUser, AutoDeleteSettingForChannels, AutoDeleteSettingForUsers } from "../../types/sse";
import { resetAuthData } from "./auth.data";
type ChannelAside = "members" | "voice" | null;
type ChannelAside = "members" | "voice" | "voice_fullscreen" | null;
type DMAside = "voice" | null;
export interface State {
og: { [url: string]: OG }