mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
FIX: Ignore Default category (parity with beta)
Just a little change so people still using Revite don't need to see an ugly "Default" category.
This commit is contained in:
@@ -50,8 +50,10 @@ const ServerList = styled.div`
|
|||||||
export default observer(() => {
|
export default observer(() => {
|
||||||
const client = useClient();
|
const client = useClient();
|
||||||
const state = useApplicationState();
|
const state = useApplicationState();
|
||||||
const { server: server_id, channel: channel_id } =
|
const { server: server_id, channel: channel_id } = useParams<{
|
||||||
useParams<{ server: string; channel?: string }>();
|
server: string;
|
||||||
|
channel?: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const server = client.servers.get(server_id);
|
const server = client.servers.get(server_id);
|
||||||
if (!server) return <Redirect to="/" />;
|
if (!server) return <Redirect to="/" />;
|
||||||
@@ -119,6 +121,9 @@ export default observer(() => {
|
|||||||
channels.push(addChannel(id));
|
channels.push(addChannel(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (category.title === "Default") {
|
||||||
|
elements.push(...channels);
|
||||||
|
} else {
|
||||||
elements.push(
|
elements.push(
|
||||||
<CollapsibleSection
|
<CollapsibleSection
|
||||||
id={`category_${category.id}`}
|
id={`category_${category.id}`}
|
||||||
@@ -129,6 +134,7 @@ export default observer(() => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const id of Array.from(uncategorised).reverse()) {
|
for (const id of Array.from(uncategorised).reverse()) {
|
||||||
elements.unshift(addChannel(id));
|
elements.unshift(addChannel(id));
|
||||||
|
|||||||
Reference in New Issue
Block a user